Skip to content

Add MIT License to the project #78

Add MIT License to the project

Add MIT License to the project #78

Workflow file for this run

name: Go Build
permissions:
contents: write
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
os: [linux, darwin, windows]
go: [1.21]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: Build binary
run: |
OS=${{ matrix.os }}
EXT=""
if [ "$OS" = "windows" ]; then EXT=".exe"; fi
mkdir -p build
# Set GOOS and GOARCH for cross-compilation
if [ "$OS" = "linux" ]; then
GOOS=linux GOARCH=amd64 go build -o build/reasm-$OS$EXT
elif [ "$OS" = "darwin" ]; then
GOOS=darwin GOARCH=amd64 go build -o build/reasm-$OS$EXT
elif [ "$OS" = "windows" ]; then
GOOS=windows GOARCH=amd64 go build -o build/reasm-$OS$EXT
fi
- name: Upload artifact for commits
if: github.event_name == 'push' && github.ref_type != 'tag'
uses: actions/upload-artifact@v4
with:
name: reasm-${{ matrix.os }}
path: build/reasm-${{ matrix.os }}*