-
Notifications
You must be signed in to change notification settings - Fork 2
162 lines (131 loc) · 4.23 KB
/
main.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
name: Build release
on:
push:
branches:
- master
workflow_dispatch:
env:
NIM_VERSION: binary:2.0.8
jobs:
build-manual:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nim
uses: iffy/install-nim@v5
with:
version: ${{ env.NIM_VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install Sass
run: |
npm install -g sass
sass --version
- name: Install Sphinx
run: |
pip install sphinx
sphinx-build --version
- name: Build manual
run: |
nim manual
build-release-mac:
runs-on: macOS-12
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nim
uses: iffy/install-nim@v5
with:
version: ${{ env.NIM_VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install Nim dependencies
run: nimble -y install koi osdialog riff semver winim with
- name: Inject version strings
run: |
PACKAGE_NAME=$(nim macPackageName)
echo "PACKAGE_NAME=$PACKAGE_NAME" >> $GITHUB_ENV
VERSION=$(nim versionAndGitHash)
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: macOS arm64 release build
run: nim -f releaseMacX64
- name: macOS x86-64 release build
run: nim -f releaseMacArm64
- name: Create macOS universal binary
run: nim mergeMacUniversal
- name: Create macOS app bundle
run: nim packageMac
- name: Upload release artifact
uses: actions/upload-artifact@v4
with:
name: gridmonger-v${{ env.VERSION }}-macos
path: ${{ env.PACKAGE_NAME }}
build-release-windows:
runs-on: windows-2019
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nim
uses: iffy/install-nim@v5
with:
version: ${{ env.NIM_VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install Nim dependencies
run: nimble -y install koi osdialog riff semver winim with
# - name: Inject version strings (32-bit)
# run: |
# $VERSION=nim versionAndGitHash
# "VERSION=$VERSION" >> $GITHUB_ENV
#
# $INST_PACKAGE_NAME=nim --cpu:i386 winInstallerPackageName
# "INST_PACKAGE_NAME=$INST_PACKAGE_NAME" >> $GITHUB_ENV
#
# $PORT_PACKAGE_NAME=nim --cpu:i386 winPortablePackageName
# "PORT_PACKAGE_NAME=$PORT_PACKAGE_NAME" >> $GITHUB_ENV
#
# - name: Windows 32-bit build
# run: |
# nim -f --cpu:i386 release
# nim --cpu:i386 packageWinInstaller
# nim --cpu:i386 packageWinPortable
#
# - name: Upload 32-bit installer release artifact
# uses: actions/upload-artifact@v4
# with:
# name: gridmonger-v${{ env.VERSION }}-win32-setup
# path: ${{ env.INST_PACKAGE_NAME }}
#
# - name: Upload 32-bit portable release artifact
# uses: actions/upload-artifact@v4
# with:
# name: gridmonger-v${{ env.VERSION }}-win32-portable
# path: ${{ env.PORT_PACKAGE_NAME }}
#
#
- name: Inject version strings (64-bit)
run: |
$INST_PACKAGE_NAME=nim winInstallerPackageName
"INST_PACKAGE_NAME=$INST_PACKAGE_NAME" >> $GITHUB_ENV
$PORT_PACKAGE_NAME=nim winPortablePackageName
"PORT_PACKAGE_NAME=$PORT_PACKAGE_NAME" >> $GITHUB_ENV
- name: Windows 64-bit release build
run: |
nim release
- name: Windows 64-bit installer package
run: |
nim packageWinInstaller
- name: Windows 64-bit portable package
run: |
nim packageWinPortable
- name: Upload 64-bit installer release artifact
uses: actions/upload-artifact@v4
with:
name: gridmonger-v${{ env.VERSION }}-win64-setup
path: ${{ env.INST_PACKAGE_NAME }}
- name: Upload 64-bit portable release artifact
uses: actions/upload-artifact@v4
with:
name: gridmonger-v${{ env.VERSION }}-win64-portable
path: ${{ env.PORT_PACKAGE_NAME }}