-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (66 loc) · 2.13 KB
/
release_assets.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
name: Release Assets
on:
release:
types: [created]
jobs:
release_assets:
strategy:
fail-fast: false
max-parallel: 3
matrix:
branch: [master]
target:
- os: linux
cpu: amd64
nim_branch: devel
- os: windows
cpu: amd64
nim_branch: devel
- os: macos
cpu: amd64
nim_branch: devel
include:
- target:
os: linux
builder: ubuntu-22.04
- target:
os: windows
builder: windows-2022
- target:
os: macos
builder: macos-14
name: '${{ matrix.target.os }}-${{ matrix.target.cpu }}-nim-${{ matrix.target.nim_branch }} (${{ matrix.branch }})'
runs-on: ${{ matrix.builder }}
env:
NIM_DIR: nim-${{ matrix.target.nim_branch }}-${{ matrix.target.cpu }}
NIM_BRANCH: ${{ matrix.target.nim_branch }}
NIM_ARCH: ${{ matrix.target.cpu }}
steps:
- name: Checkout Moonbird
uses: actions/checkout@v4
with:
path: Moonbird
submodules: false
- name: Setup Nim
uses: alaviss/setup-nim@0.1.1
with:
path: 'nim'
version: ${{ matrix.target.nim_branch }}
architecture: ${{ matrix.target.cpu }}
- name: Build binary
shell: bash
run: |
cd Moonbird
nimble install malebolgia@1.3.2
if [ ${{ runner.os }} = 'macOS' ]; then
nim default Moonbird
else
nim default --passL:"-static" Moonbird
fi
mv bin/Moonbird${{ runner.os == 'Windows' && '.exe' || '' }} bin/Moonbird-${{ github.event.release.tag_name }}-${{ matrix.target.os }}-${{ matrix.target.cpu }}${{ runner.os == 'Windows' && '.exe' || '' }}
- name: Upload release asset
uses: softprops/action-gh-release@v2
with:
files: ./Moonbird/bin/Moonbird-${{ github.event.release.tag_name }}-${{ matrix.target.os }}-${{ matrix.target.cpu }}${{ runner.os == 'Windows' && '.exe' || '' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}