trigger-workflow #8
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
############################################################################### | |
# RELEASE APPS | |
############################################################################### | |
name: 🚀 Release APPs | |
on: | |
repository_dispatch: | |
types: [trigger-workflow] | |
############################################################################### | |
# JOBS | |
############################################################################### | |
jobs: | |
release: | |
permissions: | |
contents: write | |
deployments: write | |
strategy: | |
fail-fast: false | |
matrix: | |
settings: | |
- platform: 'macos-latest' | |
args: '--target universal-apple-darwin' | |
- platform: 'macos-latest' | |
args: '--target x86_64-apple-darwin' | |
# - platform: 'macos-latest' | |
# args: '--target aarch64-apple-darwin' | |
# - platform: 'macos-latest' | |
- platform: 'ubuntu-22.04' | |
- platform: 'windows-latest' | |
timeout-minutes: 20 | |
runs-on: ${{ matrix.settings.platform }} | |
env: | |
TAG_VERSION: ${{ github.event.client_payload.app_version }} | |
steps: | |
######################################################################### | |
# INIT & INSTALL | |
######################################################################### | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: 🦀 Rust setup | |
if: matrix.settings.platform == 'macos-latest' | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
target: 'aarch64-apple-darwin' | |
- name: 🦀 Rust setup | |
if: matrix.settings.platform != 'macos-latest' | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
- name: 🦀 Rust cache | |
uses: swatinem/rust-cache@v2 | |
with: | |
workspaces: './src-tauri -> target' | |
- name: 📦 Install pnpm | |
uses: pnpm/action-setup@v2 | |
id: pnpm-install | |
- name: 📦 Sync node version and setup cache | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 'lts/*' | |
cache: 'pnpm' # Set this to npm, yarn or pnpm. | |
- name: 📦📄 Get package.json name | |
id: pkg | |
run: | | |
echo "name=$(jq -r '.extra.productName' ./package.json)" >> $GITHUB_OUTPUT | |
echo "description=$(jq -r '.description' ./package.json)" >> $GITHUB_OUTPUT | |
echo "homepage=$(jq -r '.homepage' ./package.json)" >> $GITHUB_OUTPUT | |
echo "docs=$(jq -r '.extra.docsUrl' ./package.json)" >> $GITHUB_OUTPUT | |
echo "repo=$(jq -r '.repository.url' ./package.json)" >> $GITHUB_OUTPUT | |
- name: 🦀 install dependencies (ubuntu only) | |
if: matrix.settings.platform == 'ubuntu-22.04' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf | |
- name: ⬇️📦 Install dependencies | |
run: | | |
pnpm install --no-frozen-lockfile | |
######################################################################### | |
# BUILD | |
######################################################################### | |
# important because app works with the core local package | |
- name: 🏗 Build | |
run: pnpm core build | |
- name: 🖥️ Build the app | |
uses: tauri-apps/tauri-action@v0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} | |
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} | |
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} | |
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} | |
with: | |
# @see https://github.com/tauri-apps/tauri-action?tab=readme-ov-file#inputs | |
projectPath: 'packages/app' | |
tagName: "${{ env.TAG_VERSION }}" | |
releaseName: '${{ steps.pkg.outputs.name }} v${{ env.TAG_VERSION }}' | |
releaseBody: | | |
${{ steps.pkg.outputs.name }} apps and extensions v${{ env.TAG_VERSION }} | |
${{ steps.pkg.outputs.description }} | |
--- | |
🌐 WEB: ${{ steps.pkg.outputs.homepage }} | |
📚 DOCUMENTATION:${{ steps.pkg.outputs.docs }} | |
🧩 CHANGELOG: ${{ steps.pkg.outputs.repo }}/blob/main/packages/app/CHANGELOG.md | |
📜 LICENSE: ${{ steps.pkg.outputs.repo }}/blob/main/LICENSE | |
releaseDraft: false | |
prerelease: false | |
includeUpdaterJson: true | |
updaterJsonKeepUniversal: true # @see https://github.com/tauri-apps/tauri-action?tab=readme-ov-file#build-options | |
includeRelease: true | |
tauriScript: pnpm tauri | |
args: ${{ matrix.settings.args }} |