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 Publish Release Binaries | |
| on: | |
| release: | |
| types: [published] | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| goos: [linux, darwin, windows] | |
| goarch: [amd64, arm64] | |
| steps: | |
| - uses: actions/[email protected] | |
| - uses: actions/[email protected] | |
| with: | |
| go-version: '1.24' | |
| - name: Build binary | |
| run: | | |
| mkdir -p dist | |
| output=remake_${{ matrix.goos }}_${{ matrix.goarch }} | |
| if [ "${{ matrix.goos }}" = "windows" ]; then output=$output.exe; fi | |
| GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} \ | |
| go build -ldflags "-s -w" -o dist/$output . | |
| - name: Publish to GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| if: startsWith(github.event.release.tag_name, 'v') | |
| with: | |
| # Subir sólo el binario correspondiente a esta matriz | |
| files: dist/remake_${{ matrix.goos }}_${{ matrix.goarch }}${{ matrix.goos == 'windows' && '.exe' || '' }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |