Skip to content

Commit

Permalink
chore(workflows): update GitHub Actions workflows and improve platfor…
Browse files Browse the repository at this point in the history
…m setup

- Upgraded actions/checkout to v4 in all jobs
- Upgraded actions/setup-node to v4 in all jobs
- Enhanced platform strategy to include macOS targets for both aarch64 and x86_64
- Specified Rust targets based on platform matrix
- Adjusted frontend dependencies installation to only the frontend directory
- Updated Tauri build and artifact upload paths
  • Loading branch information
rubenvitt committed Oct 12, 2024
1 parent d96ff47 commit 13d9fd1
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
Expand Down Expand Up @@ -81,16 +81,24 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [ macos-latest, ubuntu-22.04, windows-latest ]
include:
- platform: 'macos-latest'
args: '--target aarch64-apple-darwin'
- platform: 'macos-latest'
args: '--target x86_64-apple-darwin'
- platform: 'ubuntu-22.04'
args: ''
- platform: 'windows-latest'
args: ''
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "lts/*"

Expand All @@ -99,41 +107,44 @@ jobs:

- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}

- name: Install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: Install dependencies
run: pnpm install && pnpm add -g @tauri-apps/cli
- name: Install frontend dependencies
run: cd frontend && pnpm install

- name: Build Tauri
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
projectPath: frontend
args: ${{ matrix.args }}

- name: Upload Frontend Artifact
uses: actions/upload-artifact@v3
with:
name: frontend-artifact-${{ matrix.platform }}
path: frontend/src-tauri/target/bundle
path: frontend/src-tauri/target/release/bundle

release:
name: Create Release
needs: [build-backend, build-frontend]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "lts/*"

Expand Down

0 comments on commit 13d9fd1

Please sign in to comment.