Migrate to gha only (#615) #32
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
| # Release workflow for Launchpad | |
| # Triggered on tags (e.g., v1.5.16). | |
| name: Release | |
| permissions: | |
| contents: read # Top-level: Restricts all jobs by default | |
| packages: write # Required for uploading artifacts | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| jobs: | |
| build: | |
| name: Build Release Binaries | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.25" | |
| - name: Build binaries | |
| run: | | |
| mkdir -p dist | |
| platforms=("linux/amd64" "linux/arm64" "windows/amd64" "windows/arm64" "darwin/amd64" "darwin/arm64") | |
| for platform in "${platforms[@]}"; do | |
| GOOS=${platform%/*} | |
| GOARCH=${platform#*/} | |
| output_name="dist/launchpad_${GOOS}_${GOARCH}" | |
| if [ "$GOOS" = "windows" ]; then | |
| output_name+=".exe" | |
| fi | |
| echo "Building $output_name" | |
| GOOS=$GOOS GOARCH=$GOARCH go build -o "$output_name" ./main.go | |
| done | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: launchpad-release-binaries | |
| path: dist/ | |
| release: | |
| name: Create GitHub Release | |
| runs-on: ubuntu-latest | |
| needs: build | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download binaries | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: launchpad-release-binaries | |
| path: dist/ | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: dist/* | |
| generate_release_notes: true | |
| draft: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # TODO: Add Digicert signing here. | |
| # TODO: Push signed artifacts to S3 here. |