fix: execute skill #95
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 Release Binaries | |
| on: | |
| push: | |
| tags: | |
| - 'v*' # Trigger on version tags like v1.0.0 | |
| permissions: | |
| contents: write # Grants permission to create releases and upload assets | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.23.2' | |
| - name: Get the version | |
| id: get_version | |
| run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
| - name: Install X11 dependencies | |
| run: sudo apt-get update && sudo apt-get install -y xvfb libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxfixes-dev | |
| - name: Build binaries | |
| env: | |
| VERSION: ${{ steps.get_version.outputs.VERSION }} | |
| run: | | |
| LDFLAGS="-X 'main.version=$VERSION'" | |
| xvfb-run -a go build -ldflags="$LDFLAGS" -o aiagent-linux-x86_64 main.go | |
| GOOS=linux GOARCH=arm64 go build -ldflags="$LDFLAGS" -o aiagent-linux-arm64 main.go | |
| GOOS=linux GOARCH=riscv64 go build -ldflags="$LDFLAGS" -o aiagent-linux-riscv64 main.go | |
| GOOS=darwin GOARCH=amd64 go build -ldflags="$LDFLAGS" -o aiagent-macos-x86_64 main.go | |
| GOOS=darwin GOARCH=arm64 go build -ldflags="$LDFLAGS" -o aiagent-macos-arm64 main.go | |
| GOOS=windows GOARCH=amd64 go build -ldflags="$LDFLAGS" -o aiagent-windows-x86_64.exe main.go | |
| GOOS=windows GOARCH=arm64 go build -ldflags="$LDFLAGS" -o aiagent-windows-arm64.exe main.go | |
| - name: Upload binaries to release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: | | |
| aiagent-linux-x86_64 | |
| aiagent-linux-arm64 | |
| aiagent-linux-riscv64 | |
| aiagent-macos-x86_64 | |
| aiagent-macos-arm64 | |
| aiagent-windows-x86_64.exe | |
| aiagent-windows-arm64.exe |