-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (58 loc) · 1.49 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
name: Publish Release
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
on:
push:
tags:
- "v*.*.*"
workflow_dispatch:
jobs:
release-build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.nimble
key: ${{ runner.os }}-nimble-v2-${{ hashFiles('*.nimble') }}
restore-keys: |
${{ runner.os }}-nimble-v2-
if: runner.os != 'Windows'
- uses: jiro4989/setup-nim-action@v2
with:
nim-version: "2.2.x"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: nimble -y install -p:"-d:danger"
- uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }}
path: ./pon2.exe
if: runner.os == 'Windows'
- uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }}
path: ./pon2
if: runner.os != 'Windows'
release-publish:
needs:
- release-build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
- run: |-
zip -rv Linux.zip ./Linux
zip -rv Windows.zip ./Windows
- uses: softprops/action-gh-release@v2
with:
files: |-
./Linux.zip
./Windows.zip
generate_release_notes: true