Release #26
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*" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| windows: | |
| runs-on: windows-2022 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: yarn | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| env: | |
| npm_config_python: ${{ env.pythonLocation }}\python.exe | |
| run: yarn install --frozen-lockfile | |
| - name: Build Windows package | |
| run: yarn build:win | |
| - name: Collect Windows artifacts | |
| shell: pwsh | |
| run: | | |
| New-Item -ItemType Directory -Force -Path release | Out-Null | |
| Get-ChildItem "dist" -File | Where-Object { | |
| $_.Extension -in @('.exe', '.blockmap', '.yml') | |
| } | Copy-Item -Destination release | |
| - name: Upload Windows artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-release | |
| path: release/* | |
| macos: | |
| runs-on: macos-14 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: yarn | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| env: | |
| npm_config_python: ${{ env.pythonLocation }}/bin/python | |
| run: yarn install --frozen-lockfile | |
| - name: Build macOS package | |
| run: yarn build:mac | |
| - name: Collect macOS artifacts | |
| run: | | |
| mkdir -p release | |
| find dist -maxdepth 1 -type f \( -name "*.dmg" -o -name "*.zip" -o -name "*.blockmap" -o -name "latest-mac.yml" \) -exec cp {} release/ \; | |
| - name: Upload macOS artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: macos-release | |
| path: release/* | |
| publish: | |
| needs: [windows, macos] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download Windows artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: windows-release | |
| path: release | |
| - name: Download macOS artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: macos-release | |
| path: release | |
| - name: Publish GitHub release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| allowUpdates: true | |
| artifacts: "release/*" | |
| generateReleaseNotes: true | |
| prerelease: ${{ contains(github.ref_name, 'beta') }} | |
| token: ${{ secrets.GITHUB_TOKEN }} |