chore(release): v3.1.0 #2
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*" | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: release-${{ github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| validate-tag-version: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| - name: Validate tag commit is on an allowed release branch | |
| env: | |
| RELEASE_BASE_BRANCHES: "main" | |
| run: | | |
| git fetch --no-tags origin $RELEASE_BASE_BRANCHES | |
| for branch in $RELEASE_BASE_BRANCHES; do | |
| if git merge-base --is-ancestor "$GITHUB_SHA" "origin/$branch"; then | |
| echo "Tag commit is reachable from origin/$branch" | |
| exit 0 | |
| fi | |
| done | |
| echo "Tag commit is not reachable from any allowed release branch: $RELEASE_BASE_BRANCHES" | |
| exit 1 | |
| - name: Validate tag matches package.json version | |
| run: | | |
| TAG="${GITHUB_REF_NAME#v}" | |
| PKG_VERSION="$(node -p "require('./package.json').version")" | |
| echo "Tag version: $TAG" | |
| echo "package.json version: $PKG_VERSION" | |
| if [ "$TAG" != "$PKG_VERSION" ]; then | |
| echo "Version mismatch: tag v$TAG != package.json $PKG_VERSION" | |
| exit 1 | |
| fi | |
| quality-gates: | |
| needs: validate-tag-version | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - name: Setup Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.26" | |
| cache-dependency-path: daemon/go.sum | |
| - name: Install system build dependencies | |
| # The daemon's monitor package links libwayland-client via cgo. | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libwayland-dev | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Run canonical CI checks | |
| run: pnpm run ci:check | |
| appimage: | |
| needs: [validate-tag-version, quality-gates] | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 40 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - name: Setup Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.26" | |
| cache-dependency-path: daemon/go.sum | |
| - name: Install system build dependencies | |
| # The daemon's monitor package links libwayland-client via cgo. | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libwayland-dev | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build AppImage artifact | |
| run: make appimage | |
| - name: Generate SHA256 checksums | |
| run: | | |
| sha256sum release/*.AppImage > release/checksums.txt | |
| - name: Upload workflow artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: waypaper-engine-release | |
| path: | | |
| release/*.AppImage | |
| release/checksums.txt | |
| if-no-files-found: error | |
| - name: Publish GitHub Release assets | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| files: | | |
| release/*.AppImage | |
| release/checksums.txt |