v2.7.3 — Tiny-viewport windowing fix #52
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 | |
| # The maintainer publishes a GitHub Release; this workflow cross-compiles the | |
| # binaries and attaches them (idempotent — CI never creates the release). | |
| # | |
| # macOS binaries are built on a macOS runner with CGO ENABLED so the Apple | |
| # Silicon IOReport path (no-sudo GPU utilisation + power, like mactop/btop) is | |
| # compiled in. Linux and Windows stay CGO-free for clean static cross-compiles. | |
| on: | |
| release: | |
| types: [published] | |
| permissions: | |
| contents: write | |
| jobs: | |
| macos: | |
| name: Build macOS (CGO / IOReport) | |
| runs-on: macos-14 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| cache-dependency-path: go.sum | |
| - name: Build darwin arm64 + amd64 with CGO | |
| env: | |
| VERSION: ${{ github.ref_name }} | |
| run: | | |
| mkdir -p dist | |
| # heimdall-cli is pure-Go; building it here just covers the darwin slots | |
| # (CGO=1 is harmless for it). The four below genuinely need CGO/IOReport. | |
| for c in hub daemon dashboard helper cli; do | |
| CGO_ENABLED=1 GOOS=darwin GOARCH=arm64 \ | |
| go build -trimpath -ldflags "-s -w -X main.version=${VERSION}" \ | |
| -o "dist/heimdall-${c}_darwin_arm64" "./app/cmd/${c}" | |
| CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 CC="clang -arch x86_64" \ | |
| go build -trimpath -ldflags "-s -w -X main.version=${VERSION}" \ | |
| -o "dist/heimdall-${c}_darwin_amd64" "./app/cmd/${c}" | |
| done | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: macos | |
| path: dist/heimdall-* | |
| retention-days: 1 | |
| linux-windows: | |
| name: Build Linux + Windows (CGO-free) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| cache-dependency-path: go.sum | |
| - name: Cross-compile linux + windows | |
| env: | |
| VERSION: ${{ github.ref_name }} | |
| PLATFORMS: "linux/amd64 linux/arm64 windows/amd64 windows/arm64" | |
| OUT: dist | |
| run: bash scripts/release.sh | |
| - name: Generate manpages (.1) + plain-text help (.txt) | |
| # Tracks each binary's own --help. The dist/heimdall-* glob below attaches | |
| # and checksums them, so `man heimdall-*` works from the AUR packages. | |
| env: | |
| OUT: dist | |
| run: bash scripts/gen-manpages.sh | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: linux-windows | |
| path: dist/heimdall-* | |
| retention-days: 1 | |
| publish: | |
| name: Attach binaries to the release | |
| runs-on: ubuntu-latest | |
| needs: [macos, linux-windows] | |
| steps: | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| path: dist | |
| merge-multiple: true | |
| - name: Generate checksums | |
| run: | | |
| cd dist | |
| sha256sum heimdall-* > SHA256SUMS | |
| cat SHA256SUMS | |
| - uses: softprops/action-gh-release@v3 | |
| with: | |
| files: | | |
| dist/heimdall-* | |
| dist/SHA256SUMS | |
| scripts/install.sh | |
| scripts/install.ps1 | |
| aur: | |
| name: Publish ${{ matrix.component }}-bin to AUR | |
| runs-on: ubuntu-latest | |
| needs: [publish] | |
| # Inert until you opt in: set repo variable ENABLE_AUR=true and add the | |
| # AUR_SSH_PRIVATE_KEY secret. See packaging/aur/README.md for the one-time setup. | |
| if: vars.ENABLE_AUR == 'true' && !github.event.release.prerelease | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| component: [hub, dashboard, daemon, helper, cli] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Generate ${{ matrix.component }}-bin PKGBUILD | |
| env: | |
| VERSION: ${{ github.ref_name }} | |
| REPO: ${{ github.repository }} | |
| run: | | |
| curl -fsSL "https://github.com/${REPO}/releases/download/${VERSION}/SHA256SUMS" -o SHA256SUMS | |
| SUMS=SHA256SUMS OUT=aur-out COMPONENTS="${{ matrix.component }}" \ | |
| bash packaging/aur/gen-pkgbuild.sh | |
| - name: Publish to the AUR | |
| uses: KSXGitHub/github-actions-deploy-aur@v2.7.2 | |
| with: | |
| pkgname: heimdall-${{ matrix.component }}-bin | |
| pkgbuild: aur-out/heimdall-${{ matrix.component }}-bin/PKGBUILD | |
| commit_username: ${{ github.actor }} | |
| commit_email: kinncj@gmail.com | |
| ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }} | |
| commit_message: "Update heimdall-${{ matrix.component }}-bin to ${{ github.ref_name }}" | |
| ssh_keyscan_types: rsa,ed25519 |