Update README #1
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: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| build-linux: | |
| name: Build (Linux) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24.1' | |
| - name: Build | |
| env: | |
| GOOS: linux | |
| GOARCH: amd64 | |
| CGO_ENABLED: 1 | |
| run: | | |
| output=c2c-linux-amd64 | |
| go build -o $output ./main.go | |
| echo "artifact=$output" >> $GITHUB_ENV | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.artifact }} | |
| path: ${{ env.artifact }} | |
| build-windows: | |
| name: Build (Windows) | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24.1' | |
| - name: Build | |
| env: | |
| GOOS: windows | |
| GOARCH: amd64 | |
| CGO_ENABLED: 1 | |
| run: | | |
| $output = "c2c-windows-amd64.exe" | |
| go build -o $output ./main.go | |
| echo "artifact=$output" | Out-File -FilePath $env:GITHUB_ENV -Append | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.artifact }} | |
| path: ${{ env.artifact }} | |
| build-macos-amd64: | |
| name: Build (macOS amd64) | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24.1' | |
| - name: Build | |
| env: | |
| GOOS: darwin | |
| GOARCH: amd64 | |
| CGO_ENABLED: 1 | |
| run: | | |
| output=c2c-darwin-amd64 | |
| go build -o $output ./main.go | |
| echo "artifact=$output" >> $GITHUB_ENV | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.artifact }} | |
| path: ${{ env.artifact }} | |
| build-macos-arm64: | |
| name: Build (macOS arm64) | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24.1' | |
| - name: Build | |
| env: | |
| GOOS: darwin | |
| GOARCH: arm64 | |
| CGO_ENABLED: 1 | |
| run: | | |
| output=c2c-darwin-arm64 | |
| go build -o $output ./main.go | |
| echo "artifact=$output" >> $GITHUB_ENV | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.artifact }} | |
| path: ${{ env.artifact }} | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| needs: [build-linux, build-windows, build-macos-amd64, build-macos-arm64] | |
| steps: | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: ./dist | |
| - name: List artifacts (debug) | |
| run: ls -R ./dist | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: ./dist/**/c2c* | |
| draft: false | |
| prerelease: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |