Skip to content

Commit 767e30d

Browse files
committed
Fix github action
1 parent 197fd7f commit 767e30d

File tree

1 file changed

+30
-28
lines changed

1 file changed

+30
-28
lines changed

.github/workflows/release.yml

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,18 @@ jobs:
1313
- name: Check out code
1414
uses: actions/checkout@v4
1515

16+
- name: Set up node
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: "18"
20+
21+
- name: Set up Rust
22+
uses: actions-rs/toolchain@v1
23+
with:
24+
profile: minimal
25+
toolchain: stable
26+
override: true
27+
1628
# Ignore lines containing 'version = "x.x.x"' and hash the rest of Cargo.lock
1729
- name: Generate custom cache key
1830
id: cargo-hash
@@ -25,15 +37,15 @@ jobs:
2537
uses: actions/cache@v4
2638
with:
2739
path: ~/.cargo/registry
28-
key: ${{ runner.os }}-cargo-registry-${{ steps.cargo-hash.outputs.CARGO_CACHE_KEY }}-${{ runner.os }}
40+
key: ${{ runner.os }}-cargo-registry-${{ steps.cargo-hash.outputs.CARGO_CACHE_KEY }}
2941
restore-keys: |
3042
${{ runner.os }}-cargo-registry-
3143
3244
- name: Cache Cargo git index
3345
uses: actions/cache@v4
3446
with:
3547
path: ~/.cargo/git
36-
key: ${{ runner.os }}-cargo-git-${{ steps.cargo-hash.outputs.CARGO_CACHE_KEY }}-${{ runner.os }}
48+
key: ${{ runner.os }}-cargo-git-${{ steps.cargo-hash.outputs.CARGO_CACHE_KEY }}
3749
restore-keys: |
3850
${{ runner.os }}-cargo-git-
3951
@@ -45,29 +57,6 @@ jobs:
4557
restore-keys: |
4658
${{ runner.os }}-cargo-target-
4759
48-
- name: Set up node
49-
uses: actions/setup-node@v4
50-
with:
51-
node-version: "18"
52-
53-
- name: Set up Rust
54-
uses: actions-rs/toolchain@v1
55-
with:
56-
profile: minimal
57-
toolchain: stable
58-
override: true
59-
60-
- name: Cache node_modules
61-
uses: actions/cache@v4
62-
with:
63-
path: node_modules
64-
key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json') }}-${{ runner.os }}
65-
restore-keys: |
66-
${{ runner.os }}-node-modules-
67-
68-
- name: Install Node Module
69-
run: npm i
70-
7160
- name: Cache Tauri CLI (cross-platform)
7261
id: tauri-cli-cache
7362
uses: actions/cache@v4
@@ -79,6 +68,19 @@ jobs:
7968
restore-keys: |
8069
${{ runner.os }}-tauri-cli-
8170
71+
- name: Cache node_modules
72+
uses: actions/cache@v4
73+
with:
74+
path: node_modules
75+
key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json') }}
76+
restore-keys: |
77+
${{ runner.os }}-node-modules-
78+
79+
- name: Install Node Module
80+
run: npm i pnpm -g && pnpm i
81+
env:
82+
PATH: C:/Users/runneradmin/AppData/Roaming/npm:${{ env.PATH }}
83+
8284
- name: Install Protoc
8385
uses: arduino/setup-protoc@v3
8486
with:
@@ -96,13 +98,13 @@ jobs:
9698
run: mkdir output
9799

98100
- name: Copy files to output
99-
run: cp src-tauri\\target\\release\\bundle\\nsis\\*.exe output\\
101+
run: cp src-tauri/target/release/bundle/nsis/*.exe output/
100102

101103
- name: Upload artifact
102104
uses: actions/upload-artifact@v4
103105
with:
104106
name: windows
105-
path: output\\*.exe
107+
path: output/*.exe
106108

107109
release:
108110
name: Publish Release
@@ -111,7 +113,7 @@ jobs:
111113

112114
steps:
113115
- name: Check out code
114-
uses: actions/checkout@v2
116+
uses: actions/checkout@v4
115117

116118
- name: Determine Release Info
117119
env:

0 commit comments

Comments
 (0)