Release v1.1.11 #13
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: | |
| release: | |
| types: | |
| - published | |
| permissions: | |
| contents: write | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| concurrency: | |
| group: release-${{ github.event.release.tag_name || github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| publish: | |
| name: Build + Publish (${{ matrix.label }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: windows-latest | |
| label: Windows | |
| platform: windows | |
| script: dist:win | |
| upload_files: | | |
| release/latest.yml | |
| release/*.exe | |
| release/*.blockmap | |
| - os: ubuntu-latest | |
| label: Linux | |
| platform: linux | |
| script: dist:linux | |
| upload_files: | | |
| release/latest-linux.yml | |
| release/*.AppImage | |
| release/*.deb | |
| - os: macos-latest | |
| label: macOS | |
| platform: macos | |
| script: dist:mac | |
| upload_files: | | |
| release/latest-mac.yml | |
| release/*.dmg | |
| release/*.zip | |
| release/*.blockmap | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - name: Derive release version from tag | |
| shell: bash | |
| run: | | |
| TAG="${{ github.event.release.tag_name }}" | |
| if [[ "$TAG" =~ ^v([0-9]+\.[0-9]+\.[0-9]+)$ ]]; then | |
| VERSION="${BASH_REMATCH[1]}" | |
| elif [[ "$TAG" =~ ^([0-9]+\.[0-9]+\.[0-9]+)$ ]]; then | |
| VERSION="${BASH_REMATCH[1]}" | |
| else | |
| echo "Invalid release tag: $TAG (expected vX.Y.Z or X.Y.Z)" | |
| exit 1 | |
| fi | |
| echo "RELEASE_VERSION=$VERSION" >> "$GITHUB_ENV" | |
| echo "Using release version: $VERSION" | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Prepare package version | |
| run: node scripts/prepare-release-version.js "${{ env.RELEASE_VERSION }}" | |
| - name: Build release assets | |
| run: npm run ${{ matrix.script }} | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| CSC_IDENTITY_AUTO_DISCOVERY: 'false' | |
| - name: Validate release artifacts | |
| run: node scripts/validate-release-assets.js "${{ env.RELEASE_VERSION }}" "${{ matrix.platform }}" | |
| - name: Attach assets to GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.event.release.tag_name }} | |
| files: ${{ matrix.upload_files }} | |
| fail_on_unmatched_files: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload workflow artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: release-${{ matrix.label }} | |
| path: release/** | |
| if-no-files-found: ignore |