Release #58
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 | |
| permissions: | |
| contents: write | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: Release version | |
| required: true | |
| default: 1.0.0 | |
| type: string | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| outputs: | |
| tag: ${{ steps.get-tag.outputs.tag }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Git config | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: lts/* | |
| cache: pnpm | |
| - name: Install Linux dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libwebkit2gtk-4.1-dev \ | |
| libayatana-appindicator3-dev \ | |
| librsvg2-dev \ | |
| patchelf | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Release | |
| run: pnpm release-it ${{ inputs.version }} --ci --verbose | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| - name: Get tag | |
| id: get-tag | |
| run: | | |
| tag=$(git describe --tags --abbrev=0) | |
| echo "tag=$tag" >> "$GITHUB_OUTPUT" | |
| build-and-upload: | |
| needs: release | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ needs.release.outputs.tag }} | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: lts/* | |
| cache: pnpm | |
| - name: Install Linux dependencies | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libwebkit2gtk-4.1-dev \ | |
| libayatana-appindicator3-dev \ | |
| librsvg2-dev \ | |
| patchelf | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build Windows bundle | |
| if: runner.os == 'Windows' | |
| run: pnpm exec tauri build --ci --bundles nsis | |
| - name: Build bundle | |
| if: runner.os != 'Windows' | |
| run: pnpm build | |
| - name: Upload bundles | |
| shell: bash | |
| run: | | |
| find src-tauri/target/release/bundle -type f -print0 \ | |
| | xargs -0 gh release upload "${{ needs.release.outputs.tag }}" --clobber | |
| env: | |
| GH_TOKEN: ${{ github.token }} |