Skip to content

Commit

Permalink
ci: update release github workflow
Browse files Browse the repository at this point in the history
general
* allow workflow to be run manually
* explicitly set workflow permissions
* unpin swatinem/rust-cache version (Cargo.lock version 4 support)
* only install macos rust targets on macos runners
* pass args to build step

macos
* update runner to macos-latest
* build for intel and aarch64
* only build dmg bundles
(tauri-apps/tauri#5890)
* disable tauri build ci flag
(tauri-apps/tauri-action#740)

windows
* only build exe bundle

linux
* update runner to ubuntu-22.04
* update dependencies for tauri 2.0
  • Loading branch information
chrisbilodeau committed Jan 1, 2025
1 parent 8a2bcc4 commit cd425f6
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,39 @@ on:

jobs:
release:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
platform: [macos-13, ubuntu-20.04, windows-latest]
include:
- platform: 'macos-latest' # for Arm based macs (M1 and above).
args: '--target aarch64-apple-darwin --bundles dmg'
- platform: 'macos-latest' # for Intel based macs.
args: '--target x86_64-apple-darwin --bundles dmg'
- platform: 'ubuntu-22.04'
args: ''
- platform: 'windows-latest'
args: '--bundles nsis'
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: Rust setup
uses: dtolnay/rust-toolchain@stable
with:
# Only install macos targets on macos runners
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}

- name: Rust cache
uses: swatinem/rust-cache@v2.7.3
uses: swatinem/rust-cache@v2
with:
workspaces: "./src-tauri -> target"

Expand All @@ -51,9 +64,11 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
CI: false
with:
tagName: ${{ github.ref_name }}
releaseName: "v__VERSION__"
releaseBody: "See the assets to download and install this version."
releaseDraft: true
prerelease: false
args: ${{ matrix.args }}

0 comments on commit cd425f6

Please sign in to comment.