-
Notifications
You must be signed in to change notification settings - Fork 4
117 lines (115 loc) · 3.06 KB
/
release.yml
File metadata and controls
117 lines (115 loc) · 3.06 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: Release
on:
push:
tags:
- v*
jobs:
create-release:
name: Create draft release
needs:
- rust-app
runs-on: ubuntu-latest
steps:
- name: Download Linux binary
uses: actions/download-artifact@v3.0.2
with:
name: app_ubuntu-latest
path: app/ubuntu
- name: Create Linux Release Artifact
run: |
tar -czvf sd2snes-lttp-rando-tracker-linux-release.tar.gz -C app/ubuntu .
- name: Download Windows binary
uses: actions/download-artifact@v3.0.2
with:
name: app_windows-latest
path: app/windows
- name: Create Windows Release Artifact
run: |
zip --junk-paths sd2snes-lttp-rando-tracker-windows-release.zip app/windows/sd2snes-*
- name: Download macOS binary
uses: actions/download-artifact@v3.0.2
with:
name: app_macOS-latest
path: app/macos
- name: Create macOS Release Artifact
run: |
tar -czvf sd2snes-lttp-rando-tracker-macos-release.tar.gz -C app/macos .
- name: Create release
id: create_release
uses: softprops/action-gh-release@v1
with:
draft: true
prerelease: false
files: |
sd2snes-*-release.*
web-ui:
name: Vue.js app
strategy:
matrix:
node-version:
- 18.13.0
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.3.0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3.6.0
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache-dependency-path: ui/package-lock.json
- name: Install
run: |
cd ui
npm install
- name: Build
run: |
cd ui
npm run build
- uses: actions/upload-artifact@v3.1.2
with:
name: ui-dist
path: ui/dist
rust-app:
name: Rust app
needs:
- web-ui
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macOS-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3.3.0
- uses: actions/download-artifact@v3.0.2
with:
name: ui-dist
path: ui/dist
- name: Install Rust
run:
curl https://sh.rustup.rs -sSf | sh -s -- -y
- uses: actions/cache@v3.2.3
name: Cache cargo
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Test
run:
cargo test --verbose
- name: Build
run:
cargo build --verbose --release
- name: Upload release artifact
uses: actions/upload-artifact@v3.1.2
with:
name: app_${{ matrix.os }}
path: |
target/release/sd2snes-lttp-rando-tracker*
!**/*.d
!**/*.pdb