-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(fix): add release workflow with tauri updater (#7)
Description Add release workflow with tauri updater Motivation and Context Having a tauri application that builds and has updater function How Has This Been Tested? Mostly built in local fork. What process can a PR reviewer use to test or verify this change? --- <!-- Checklist --> <!-- 1. Is the title of your PR in the form that would make nice release notes? The title, excluding the conventional commit tag, will be included exactly as is in the CHANGELOG, so please think about it carefully. --> Breaking Changes --- - [x] None - [ ] Requires data directory on base node to be deleted - [ ] Requires hard fork - [ ] Other - Please specify <!-- Does this include a breaking change? If so, include this line as a footer --> <!-- BREAKING CHANGE: Description what the user should do, e.g. delete a database, resync the chain -->
- Loading branch information
Showing
4 changed files
with
376 additions
and
17 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
--- | ||
name: Release | ||
|
||
'on': | ||
push: | ||
paths-ignore: | ||
- '**/*.md' | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+' | ||
branches: | ||
- 'main' | ||
- 'build-*' | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
# https://docs.github.com/en/actions/examples/using-concurrency-expressions-and-a-test-matrix | ||
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' | ||
cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/v') || github.ref != 'refs/heads/main' }} | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
builds: | ||
name: Building ${{ matrix.platform }} | ||
permissions: | ||
contents: write | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- platform: 'ubuntu-20.04' | ||
args: '' | ||
- platform: 'windows-2019' | ||
args: '' | ||
- platform: 'macos-latest' | ||
args: '--verbose --target universal-apple-darwin' | ||
|
||
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Node.js setup | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
cache: 'npm' | ||
|
||
- name: Rust setup (macOS) | ||
if: startsWith(runner.os,'macOS') | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
target: aarch64-apple-darwin,x86_64-apple-darwin | ||
|
||
- name: Rust setup (linux) | ||
if: startsWith(runner.os,'Linux') | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
target: aarch64-unknown-linux-gnu | ||
|
||
- name: Cache cargo files and outputs | ||
if: ${{ ( ! startsWith(github.ref, 'refs/tags/v') ) }} | ||
uses: swatinem/rust-cache@v2 | ||
with: | ||
workspaces: './src-tauri -> target' | ||
|
||
- name: Install dependencies (linux) | ||
if: startsWith(runner.os,'Linux') | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install --no-install-recommends --assume-yes \ | ||
libwebkit2gtk-4.0-dev \ | ||
libappindicator3-dev \ | ||
librsvg2-dev \ | ||
patchelf | ||
- name: Install dependencies (node) | ||
run: | | ||
npm --version | ||
npm install | ||
- name: Build Tauri apps | ||
uses: tauri-apps/tauri-action@v0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
ENABLE_CODE_SIGNING: ${{ secrets.APPLE_CERTIFICATE }} | ||
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_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} | ||
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} | ||
with: | ||
tagName: tari_universe-v__VERSION__ | ||
releaseName: 'Tari Universe v__VERSION__' | ||
releaseBody: 'Tari Universe - See the assets to download this version and install' | ||
releaseDraft: true | ||
prerelease: ${{ ( ! startsWith(github.ref, 'refs/tags/v') ) }} | ||
includeDebug: ${{ ( ! startsWith(github.ref, 'refs/tags/v') ) }} | ||
includeRelease: ${{ ( startsWith(github.ref, 'refs/tags/v') ) }} | ||
updaterJsonKeepUniversal: true | ||
args: ${{ matrix.args }} |
Oops, something went wrong.