Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Upload Go Project for Release | |
| on: | |
| release: | |
| types: [created] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| os: [ubuntu, windows, macos] | |
| go-version: [1.24.3] | |
| steps: | |
| - name: Checkout the code | |
| uses: actions/checkout@v2 | |
| - name: Set up Go | |
| uses: actions/setup-go@v2 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - name: Build buglang binary | |
| run: | | |
| GOOS=${{ matrix.os == 'macos' && 'darwin' || matrix.os == 'windows' && 'windows' || 'linux' }} \ | |
| GOARCH=amd64 \ | |
| go build -o buglang-${{ matrix.os }}${{ matrix.os == 'windows' && '.exe' || '' }} ./cmd/main.go | |
| - name: Build fpm binary | |
| run: | | |
| GOOS=${{ matrix.os == 'macos' && 'darwin' || matrix.os == 'windows' && 'windows' || 'linux' }} \ | |
| GOARCH=amd64 \ | |
| go build -o fpm-${{ matrix.os }}${{ matrix.os == 'windows' && '.exe' || '' }} ./cmd/fpm/main.go | |
| - name: Upload buglang binary to release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: buglang-${{ matrix.os }}${{ matrix.os == 'windows' && '.exe' || '' }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.TOKEN }} | |
| - name: Upload fpm binary to release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: fpm-${{ matrix.os }}${{ matrix.os == 'windows' && '.exe' || '' }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.TOKEN }} |