-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (46 loc) · 1.41 KB
/
Copy pathdeploy.yml
File metadata and controls
54 lines (46 loc) · 1.41 KB
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
name: deploy
on:
workflow_call:
workflow_dispatch:
pull_request:
paths:
- 'Cargo.toml'
- 'Cargo.lock'
- 'compiler/**/*'
- 'decompiler/**/*'
- 'script-common/**/*'
- 'script-extractor/**/*'
- 'script-patch/**/*'
concurrency:
group: deploy-${{ github.ref_name }}
cancel-in-progress: true
jobs:
deploy:
runs-on: windows-latest
environment: deploy
steps:
- uses: actions/checkout@v4
- name: Extract Commit SHA
id: commit-sha
run: |
"short_sha=" + "${{ github.sha }}".SubString(0, 8) >> $env:GITHUB_OUTPUT
- name: Setup rust
uses: dtolnay/rust-toolchain@nightly
with:
targets: x86_64-pc-windows-msvc
- uses: Swatinem/rust-cache@v2
with:
shared-key: 'deploy'
cache-on-failure: true
cache-all-crates: true
- name: Build
run: cargo build --bins --release --target x86_64-pc-windows-msvc
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: 'scn-tool-${{ steps.commit-sha.outputs.short_sha }}'
path: |
target/x86_64-pc-windows-msvc/release/scn-compiler.exe
target/x86_64-pc-windows-msvc/release/scn-decompiler.exe
target/x86_64-pc-windows-msvc/release/scn-script-extractor.exe
target/x86_64-pc-windows-msvc/release/scn-script-patch.exe