Skip to content

Commit

Permalink
ci: Update pipelines for Rust workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
gmallios committed Feb 26, 2024
1 parent 1206e2d commit 34d459b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 20 deletions.
21 changes: 5 additions & 16 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Build latest"
name: "Build latest commit"

on:
push:
Expand All @@ -23,7 +23,6 @@ jobs:
- name: ⏬ Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable

- name: ⚡ Set up cargo cache
Expand All @@ -36,6 +35,7 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
src-tauri/target/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo

Expand All @@ -52,34 +52,23 @@ jobs:
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: 📥 Install Node Dependencies
run: yarn && yarn build
run: yarn

- name: 🔨 Build
uses: tauri-apps/tauri-action@v0
id: tauri-build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# - name: ⏫ Upload Release Asset
# id: upload-release-asset
# uses: actions/upload-release-asset@v1.0.2
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.tauri-build.outputs.releaseUploadUrl }}
# asset_path: src-tauri\target\release\deps\soundcoremanager.exe
# asset_name: SoundcoreManager-${{ matrix.platform }}-${{ env.SHORT_SHA }}.exe
# asset_content_type: application/vnd.microsoft.portable-executable.

- name: Rename soundcoremanager.exe
if: matrix.platform == 'windows-latest'
run: ren src-tauri\target\release\deps\soundcoremanager.exe SoundcoreManager-${{ matrix.platform }}-${{ env.SHORT_SHA }}.exe
run: ren target\release\deps\soundcoremanager.exe SoundcoreManager-${{ matrix.platform }}-${{ env.SHORT_SHA }}.exe

- name: ⏫ Upload Build Artifact
if: matrix.platform == 'windows-latest'
uses: actions/upload-artifact@v3
with:
name: SoundcoreManager-${{ matrix.platform }}.exe
path: src-tauri\target\release\deps\SoundcoreManager-${{ matrix.platform }}-${{ env.SHORT_SHA }}.exe
path: target\release\deps\SoundcoreManager-${{ matrix.platform }}-${{ env.SHORT_SHA }}.exe


8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ jobs:
- name: ⏬ Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable

- name: ⚡ Set up cargo cache
Expand All @@ -36,6 +35,7 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
src-tauri/target/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo

Expand All @@ -52,7 +52,7 @@ jobs:
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: 📥 Install Node Dependencies
run: yarn && yarn build
run: yarn install --frozen-lockfile

- name: 🔨 Build
uses: tauri-apps/tauri-action@v0
Expand All @@ -79,13 +79,13 @@ jobs:

- name: Rename soundcoremanager.exe
if: matrix.platform == 'windows-latest'
run: ren src-tauri\target\release\deps\soundcoremanager.exe SoundcoreManager-${{ matrix.platform }}-${{ env.SHORT_SHA }}.exe
run: ren target\release\deps\soundcoremanager.exe SoundcoreManager-${{ matrix.platform }}-${{ env.SHORT_SHA }}.exe

- name: ⏫ Upload Build Artifact
if: matrix.platform == 'windows-latest'
uses: actions/upload-artifact@v3
with:
name: SoundcoreManager-${{ matrix.platform }}.exe
path: src-tauri\target\release\deps\SoundcoreManager-${{ matrix.platform }}-${{ env.SHORT_SHA }}.exe
path: target\release\deps\SoundcoreManager-${{ matrix.platform }}-${{ env.SHORT_SHA }}.exe


0 comments on commit 34d459b

Please sign in to comment.