-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Establish CI/CD workflows for multi-platform builds
- Establish GitHub Actions workflows for building and releasing the project. - Configure the build workflow to support multiple platforms and install necessary dependencies. - Implement a release workflow that automates the creation of draft releases on tag pushes.
- Loading branch information
1 parent
f2a5175
commit af1b4aa
Showing
2 changed files
with
110 additions
and
0 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,53 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- 'src/**' | ||
- 'src-tauri/**' | ||
- 'pnpm-lock.yaml' | ||
- '.github/workflows/build.yml' | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: build-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test-build: | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
platform: [macos-latest, ubuntu-latest, windows-latest] | ||
|
||
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install pnpm + deps | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 9 | ||
run_install: true | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'pnpm' | ||
|
||
- name: Install Rust stable | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
|
||
- name: Install Linux dependencies | ||
if: matrix.platform == 'ubuntu-latest' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf | ||
- name: Build Vite + Tauri | ||
run: pnpm build |
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,57 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: release-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
publish: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: [macos-latest, ubuntu-latest, windows-latest] | ||
|
||
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 9 | ||
run_install: true | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'pnpm' | ||
|
||
- name: install Rust stable | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
|
||
- name: install dependencies (ubuntu only) | ||
if: matrix.platform == 'ubuntu-latest' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf | ||
- name: Build Vite + Tauri | ||
run: pnpm build | ||
|
||
- name: Create release | ||
uses: tauri-apps/tauri-action@v0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tagName: v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version | ||
releaseName: 'v__VERSION__' | ||
releaseBody: 'See the assets to download and install this version.' | ||
releaseDraft: true | ||
prerelease: false |