feat: create developer plugin #45
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: "Tauri App Publish" | |
# on: | |
# push: | |
# tags: | |
# - "v*" | |
# workflow_dispatch: | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
publish-tauri: | |
permissions: | |
contents: write | |
strategy: | |
fail-fast: false | |
matrix: | |
settings: | |
- platform: 'macos-14' # for Arm based macs (M1 and above). | |
args: '--target aarch64-apple-darwin --verbose' | |
- platform: 'macos-14' # for Intel based macs. | |
args: '--target x86_64-apple-darwin --verbose' | |
- platform: "macos-14" # for Both Arm and Intel based macs. | |
args: "--target universal-apple-darwin --verbose" | |
- platform: 'ubuntu-22.04' # for Tauri v1 you could replace this with ubuntu-20.04. | |
args: "--verbose" | |
- platform: 'windows-latest' | |
args: "--verbose" | |
runs-on: ${{ matrix.settings.platform }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: "true" | |
- name: install dependencies (ubuntu only) | |
if: matrix.settings.platform == 'ubuntu-22.04' # This must match the platform value defined above. | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf | |
curl -fsSL https://d2lang.com/install.sh | sh -s -- | |
# webkitgtk 4.0 is for Tauri v1 - webkitgtk 4.1 is for Tauri v2. | |
# You can remove the one that doesn't apply to your app to speed up the workflow a bit. | |
- 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. | |
cache-dependency-path: ./pnpm-lock.yaml | |
- name: Install Rust stable | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds. | |
targets: ${{ matrix.settings.platform == 'macos-14' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} | |
- name: Add rust target (macos only) | |
if: matrix.settings.platform == 'macos-14' | |
run: | | |
rustup target add aarch64-apple-darwin | |
rustup target add x86_64-apple-darwin | |
- name: Rust cache | |
uses: swatinem/rust-cache@v2 | |
with: | |
workspaces: "./apps/desktop/src-tauri -> target" | |
- uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: 1.1.10 | |
- name: Install frontend dependencies | |
# If you don't have `beforeBuildCommand` configured you may want to build your frontend here too. | |
# env: | |
# SUPABASE_GRAPHQL_ENDPOINT: ${{ secrets.SUPABASE_GRAPHQL_ENDPOINT }} | |
# SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }} | |
run: | | |
pnpm install # change this to npm or pnpm depending on which one you use. | |
npx turbo run build --filter=desktop... | |
# pnpm build:packages | |
- uses: tauri-apps/tauri-action@v0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NODE_OPTIONS: "--max_old_space_size=4096" | |
# APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} | |
# # APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
# # APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }} | |
# # APPLE_ID: ${{ secrets.APPLE_ID }} | |
# # APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} | |
# APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
# TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} | |
# TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} | |
# Otherwise Page won't load because constant vars cannot be loaded | |
# PUBLIC_SUPABASE_URL: ${{ secrets.SUPABASE_URL }} | |
# PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }} | |
# PUBLIC_SUPABASE_GRAPHQL_ENDPOINT: ${{ secrets.SUPABASE_GRAPHQL_ENDPOINT }} | |
with: | |
tagName: penx-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version. | |
releaseName: "Penx v__VERSION__" | |
releaseBody: "A cross-platform productivity App, take a look at the assets to download and install this app." | |
releaseDraft: true | |
prerelease: false | |
args: ${{ matrix.settings.args }} | |
projectPath: "./apps/desktop" |