Skip to content

Commit 8dd1f9c

Browse files
committed
ci: Update yarn.lock and release pipeline
1 parent a17599e commit 8dd1f9c

File tree

3 files changed

+824
-799
lines changed

3 files changed

+824
-799
lines changed

.github/workflows/release.yml

Lines changed: 65 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,91 @@
1-
name: Release
1+
name: "Build release"
2+
23
on:
34
push:
4-
tags:
5-
- 'v*'
5+
branches:
6+
- release
67
workflow_dispatch:
78

89
jobs:
9-
release:
10+
build-tauri-and-release:
1011
strategy:
11-
fail-fast: false
12+
fail-fast: true
1213
matrix:
1314
platform: [windows-latest]
15+
1416
runs-on: ${{ matrix.platform }}
1517
steps:
16-
- name: Checkout repository
17-
uses: actions/checkout@v3
18+
- uses: actions/checkout@v3
1819

19-
- name: Install dependencies (ubuntu only)
20-
if: matrix.platform == 'ubuntu-20.04'
21-
# You can remove libayatana-appindicator3-dev if you don't use the system tray feature.
22-
run: |
23-
sudo apt-get update
24-
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev
20+
- name: ⚡ Set short SHA ENV
21+
run: echo "SHORT_SHA=$("${{ github.sha }}".SubString(0, 8))" >> $env:GITHUB_ENV
2522

26-
- name: Rust setup
23+
- name: ⏬ Install Rust stable
2724
uses: dtolnay/rust-toolchain@stable
25+
with:
26+
profile: minimal
27+
toolchain: stable
2828

29-
- name: Rust cache
30-
uses: swatinem/rust-cache@v2
29+
- name: ⚡ Set up cargo cache
30+
uses: actions/cache@v3
31+
continue-on-error: false
3132
with:
32-
workspaces: './src-tauri -> target'
33+
path: |
34+
~/.cargo/bin/
35+
~/.cargo/registry/index/
36+
~/.cargo/registry/cache/
37+
~/.cargo/git/db/
38+
src-tauri/target/
39+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
40+
restore-keys: ${{ runner.os }}-cargo
3341

34-
- name: Sync node version and setup cache
42+
- name: 🔄 Sync node version
3543
uses: actions/setup-node@v3
3644
with:
37-
node-version: 'lts/*'
38-
cache: 'yarn' # Set this to npm, yarn or pnpm.
45+
node-version: "lts/*"
46+
cache: "yarn"
3947

40-
- name: Install app dependencies and build web
41-
# Remove `&& yarn build` if you build your frontend in `beforeBuildCommand`
42-
run: yarn && yarn build # Change this to npm, yarn or pnpm.
48+
- name: ⏬ Install Ubuntu dependencies
49+
if: matrix.platform == 'ubuntu-20.04'
50+
run: |
51+
sudo apt-get update
52+
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
4353
44-
- name: Build the app
45-
uses: tauri-apps/tauri-action@v0
54+
- name: 📥 Install Node Dependencies
55+
run: yarn && yarn build
4656

57+
- name: 🔨 Build
58+
uses: tauri-apps/tauri-action@v0
59+
id: tauri-build
4760
env:
4861
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4962
with:
50-
tagName: ${{ github.ref_name }} # This only works if your workflow triggers on new tags.
51-
releaseName: 'App Name v__VERSION__' # tauri-action replaces \_\_VERSION\_\_ with the app version.
52-
releaseBody: 'See the assets to download and install this version.'
63+
tagName: soundcoremanager-v__VERSION__
64+
releaseName: 'Soundcore Manager v__VERSION__'
65+
releaseBody: 'See the assets to download this version and install.'
5366
releaseDraft: true
5467
prerelease: false
68+
69+
- name: ⏫ Upload Release Asset
70+
id: upload-release-asset
71+
uses: actions/upload-release-asset@v1.0.2
72+
env:
73+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74+
with:
75+
upload_url: ${{ steps.tauri-build.outputs.releaseUploadUrl }}
76+
asset_path: src-tauri\target\release\deps\soundcoremanager.exe
77+
asset_name: SoundcoreManager-${{ matrix.platform }}-${{ env.SHORT_SHA }}.exe
78+
asset_content_type: application/vnd.microsoft.portable-executable.
79+
80+
- name: Rename soundcoremanager.exe
81+
if: matrix.platform == 'windows-latest'
82+
run: ren src-tauri\target\release\deps\soundcoremanager.exe SoundcoreManager-${{ matrix.platform }}-${{ env.SHORT_SHA }}.exe
83+
84+
- name: ⏫ Upload Build Artifact
85+
if: matrix.platform == 'windows-latest'
86+
uses: actions/upload-artifact@v3
87+
with:
88+
name: SoundcoreManager-${{ matrix.platform }}.exe
89+
path: src-tauri\target\release\deps\SoundcoreManager-${{ matrix.platform }}-${{ env.SHORT_SHA }}.exe
90+
91+

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"chart.js": "~3.9.1",
2626
"chartjs-plugin-dragdata": "^2.2.4",
2727
"react": "^18.2.0",
28-
"react-chartjs-2": "^5.0.0",
28+
"react-chartjs-2": "^4.3.1",
2929
"react-dom": "^18.2.0",
3030
"tauri-plugin-log-api": "https://github.com/tauri-apps/tauri-plugin-log",
3131
"zustand": "^4.1.3"

0 commit comments

Comments
 (0)