-
Notifications
You must be signed in to change notification settings - Fork 25
88 lines (83 loc) · 2.6 KB
/
release.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Release
on:
workflow_dispatch
env:
CARGO_TERM_COLOR: always
jobs:
linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Build csdemoparser
run: cargo build -p csdemoparser --release
- name: Test csdemoparser
run: cargo test -p csdemoparser --release
- uses: actions/upload-artifact@v4
with:
name: rust-linux
path: target/release/csdemoparser
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Build csdemoparser
run: cargo build -p csdemoparser --release
- name: Test csdemoparser
run: cargo test -p csdemoparser --release
- uses: actions/upload-artifact@v4
with:
name: rust-windows
path: target/release/csdemoparser.exe
package:
runs-on: ubuntu-latest
needs: [linux, windows]
steps:
- uses: actions/checkout@v3
# oldui
- uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
- run: npm install -g bower
- run: bower install
# Clojure
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Install Leiningen
uses: DeLaGuardo/[email protected]
with:
lein: '2.10.0'
- name: Cache Clojure dependencies
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: cljdeps-${{ hashFiles('project.clj') }}
restore-keys: cljdeps-
- name: Build jar
run: LEIN_SNAPSHOTS_IN_RELEASE=1 lein uberjar
- run: |
mv target-lein/hsbox-*-standalone.jar target-lein/hsbox-standalone.jar
echo 'java -jar hsbox-standalone.jar --port 4000' > target-lein/headshotbox.sh
echo 'start javaw -jar hsbox-standalone.jar --port 4000 --systray' > target-lein/headshotbox.bat
echo 'java -jar hsbox-standalone.jar --port 4000' > target-lein/headshotbox_console.bat'
chmod a+x target-lein/headshotbox.sh
# Package
- uses: actions/download-artifact@v4
with:
path: release
merge-multiple: true
- name: Zip
run: |
zip -j headshotbox-linux.zip target-lein/hsbox-standalone.jar target-lein/headshotbox.sh release/csdemoparser
zip -j headshotbox-win.zip target-lein/hsbox-standalone.jar target-lein/headshotbox.bat target-lein/headshotbox_console.bat release/csdemoparser.exe
- name: Release
uses: softprops/action-gh-release@v1
with:
draft: true
files: |
headshotbox-linux.zip
headshotbox-win.zip