Skip to content

Commit

Permalink
Try to save artifacts on main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
TrueCarry committed Sep 19, 2024
1 parent e28f141 commit 58da4fb
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: 'Tauri Publish Release'

on:
push:
branches:
- main

env:
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}

jobs:
build-tauri:
strategy:
fail-fast: false
matrix:
include:
#- platform: 'macos-latest' # for Arm based macs (M1 and above).
# args: '--target aarch64-apple-darwin'
- platform: 'macos-latest' # for Intel based macs.
args: '--target x86_64-apple-darwin'
- platform: 'ubuntu-20.04'
args: ''
- platform: 'windows-latest'
args: ''
# matrix:
# platform: [macos-latest, ubuntu-20.04, windows-latest]
# platform: [ubuntu-20.04]

runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
- 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.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
- run: corepack enable
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: install app dependencies and build it
run: pnpm install

- name: use mold
uses: rui314/setup-mold@v1

- name: cache rust
uses: Swatinem/rust-cache@v2
with:
workspaces: "src-tauri"

- name: tauri
uses: tauri-apps/tauri-action@v0.5.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: upload artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.platform }}-binaries
path: |
./src-tauri/target/release/bundle/**/*.msi
./src-tauri/target/release/bundle/**/*.dmg
./src-tauri/target/release/bundle/**/*.AppImage
./src-tauri/target/release/bundle/**/*.deb

0 comments on commit 58da4fb

Please sign in to comment.