on-demand-release #39
This file contains 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: | |
repository_dispatch: | |
types: [on-demand-release] | |
jobs: | |
publish-tauri: | |
permissions: | |
contents: write | |
strategy: | |
matrix: | |
include: | |
- platform: macos-latest | |
args: "--target aarch64-apple-darwin" | |
name: macOS arm64 | |
- platform: macos-latest | |
args: "--target x86_64-apple-darwin" | |
name: macOS Intel | |
- platform: "windows-latest" | |
args: "" | |
name: Windows x64 | |
name: ${{ matrix.name }} | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Check out project | |
uses: actions/checkout@v4 | |
with: | |
repository: egoist/chatwise | |
token: ${{ secrets.GH_TOKEN_FOR_CHECKOUT }} | |
ref: ${{ github.event.client_payload.sha }} | |
- uses: pnpm/action-setup@v4 | |
- name: setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
cache: "pnpm" # Set this to npm, yarn or pnpm. | |
- name: setup go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "stable" | |
- name: install Rust stable | |
uses: dtolnay/rust-toolchain@stable # Set this to dtolnay/rust-toolchain@nightly | |
with: | |
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds. | |
targets: ${{ contains(matrix.platform, 'macos') && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} | |
- name: Rust cache | |
uses: swatinem/rust-cache@v2 | |
with: | |
workspaces: ". -> target" | |
- name: install frontend dependencies | |
# If you don't have `beforeBuildCommand` configured you may want to build your frontend here too. | |
run: pnpm install # change this to npm or pnpm depending on which one you use. | |
- uses: tauri-apps/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
APPLE_CERTIFICATE: ${{secrets.APPLE_CERTIFICATE}} | |
APPLE_CERTIFICATE_PASSWORD: ${{secrets.APPLE_CERTIFICATE_PASSWORD}} | |
APPLE_ID: ${{secrets.APPLE_ID}} | |
APPLE_PASSWORD: ${{secrets.APPLE_PASSWORD}} | |
APPLE_TEAM_ID: ${{secrets.APPLE_TEAM_ID}} | |
TAURI_SIGNING_PRIVATE_KEY: ${{secrets.TAURI_SIGNING_PRIVATE_KEY}} | |
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD}} | |
SENTRY_AUTH_TOKEN: ${{secrets.SENTRY_AUTH_TOKEN}} | |
SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | |
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} | |
IS_INTEL_MAC: ${{ contains(matrix.args, 'x86_64') }} | |
MY_NAME: ${{ secrets.MY_NAME }} | |
with: | |
projectPath: ./desktop | |
tagName: v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version. | |
releaseName: "v__VERSION__" | |
releaseBody: "See the assets to download this version and install." | |
releaseDraft: true | |
prerelease: false | |
args: ${{ matrix.args }} | |
repo: chatwise-releases | |
owner: egoist | |
releaseCommitish: main |