-
Notifications
You must be signed in to change notification settings - Fork 10
74 lines (60 loc) · 2.07 KB
/
push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: "Build latest commit"
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build-tauri:
strategy:
fail-fast: true
matrix:
platform: [windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- name: ⚡ Set short SHA ENV
run: echo "SHORT_SHA=$("${{ github.sha }}".SubString(0, 8))" >> $env:GITHUB_ENV
- name: ⏬ Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: ⚡ Set up cargo cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
src-tauri/target/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo
- name: 🔄 Sync node version
uses: actions/setup-node@v3
with:
node-version: "lts/*"
cache: "yarn"
- name: ⏬ Install Ubuntu dependencies
if: matrix.platform == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: 📥 Install Node Dependencies
run: yarn --frozen-lockfile
- name: 🔨 Build
uses: tauri-apps/tauri-action@v0
id: tauri-build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Rename soundcoremanager.exe
if: matrix.platform == 'windows-latest'
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: target\release\deps\SoundcoreManager-${{ matrix.platform }}-${{ env.SHORT_SHA }}.exe