Repository navigation
61 lines (48 loc) · 1.7 KB
/
Copy pathwindows-installer.yml
File metadata and controls
61 lines (48 loc) · 1.7 KB
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
name: Windows installer (electron-builder test build)
# Manual, artifact-only build of the electron-builder NSIS package.
# Stable releases are owned by release.yml, which builds the Inno Setup installer
# the in-app updater is written for (stable AppId for in-place upgrades, and the
# /SP- /NORESTART install flags). This workflow deliberately has no tag trigger:
# two workflows publishing on the same tag would race and attach two different
# installers to one release.
on:
workflow_dispatch:
permissions:
contents: read
jobs:
installer:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Match the npm version that wrote the lock file
run: npm install -g npm@11
- name: Check the tag matches package.json
if: startsWith(github.ref, 'refs/tags/v')
shell: bash
run: |
version=$(node -p "require('./package.json').version")
if [ "${GITHUB_REF_NAME}" != "v${version}" ]; then
echo "Tag ${GITHUB_REF_NAME} does not match package.json version ${version}"
exit 1
fi
- name: Install dependencies
run: npm ci
- name: Build installer
run: npm run dist
- name: Write checksum
shell: bash
run: |
cd dist
sha256sum RunContainer-Stable-Setup-*.exe > SHA256SUMS.txt
cat SHA256SUMS.txt
- name: Upload installer
uses: actions/upload-artifact@v4
with:
name: RunContainer-Stable-Setup
path: |
dist/RunContainer-Stable-Setup-*.exe
dist/SHA256SUMS.txt
if-no-files-found: error