-
Notifications
You must be signed in to change notification settings - Fork 27
111 lines (93 loc) · 3.35 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: release
on: [push, pull_request]
jobs:
build-mod:
runs-on: ubuntu-22.04
name: Build mod and ewext
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: i686-pc-windows-gnu
- name: Install extra deps
run: sudo apt-get install -y gcc-mingw-w64-i686
- uses: Swatinem/rust-cache@v2
with:
workspaces: ewext -> target
- name: Build ewext
run: cargo build --release --target i686-pc-windows-gnu
working-directory: ./ewext
- name: Copy ewext
run: cp ewext/target/i686-pc-windows-gnu/release/ewext.dll quant.ew/ewext0.dll
- name: Create archive
run: python scripts/ci_make_archives.py mod
- uses: actions/upload-artifact@v4
with:
name: quant.ew.zip
path: target/quant.ew.zip
build-proxy-linux:
name: Build proxy for linux
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-pc-windows-gnu
- name: Install extra deps
run: sudo apt-get install -y libclang-dev libgtk-3-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev gcc-mingw-w64-i686 gcc-mingw-w64
- uses: Swatinem/rust-cache@v2
with:
workspaces: noita-proxy -> target
- name: Build Linux proxy release
run: cargo build --release
working-directory: ./noita-proxy
- name: Create archives
run: python scripts/ci_make_archives.py linux
- uses: actions/upload-artifact@v4
with:
name: noita-proxy-linux.zip
path: target/noita-proxy-linux.zip
build-proxy-windows:
name: Build proxy for windows
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-pc-windows-gnu
- name: Install extra deps
run: sudo apt-get install -y libclang-dev libgtk-3-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev gcc-mingw-w64-i686 gcc-mingw-w64
- uses: Swatinem/rust-cache@v2
with:
workspaces: noita-proxy -> target
- name: Build Windows proxy release
run: cargo build --release --target x86_64-pc-windows-gnu
working-directory: ./noita-proxy
- name: Create archives
run: python scripts/ci_make_archives.py windows
- uses: actions/upload-artifact@v4
with:
name: noita-proxy-win.zip
path: target/noita-proxy-win.zip
release:
name: Release
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-22.04
permissions:
contents: write
needs: [build-mod, build-proxy-linux, build-proxy-windows]
steps:
- uses: actions/checkout@v4
- name: Download all workflow run artifacts
uses: actions/download-artifact@v4
with:
merge-multiple: true
- name: Get tag message
run: git tag -l --format='%(contents)' $(git describe --tags) > release_body.md
- name: Print release body
run: cat release_body.md
- uses: ncipollo/release-action@v1
with:
draft: true
artifacts: "*.zip"
bodyFile: release_body.md