-
Notifications
You must be signed in to change notification settings - Fork 3
153 lines (128 loc) · 4.65 KB
/
Copy pathrelease.yaml
File metadata and controls
153 lines (128 loc) · 4.65 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
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
name: "Releasing with compressed binary"
on:
workflow_dispatch:
inputs:
prerelease:
description: "Publish as a prerelease (alpha). Uncheck for a full release."
type: boolean
default: true
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 24
- name: Install npm modules
run: npm i
- name: Build Linux binary
run: npm run build:sea:linux
- name: Upload Linux artifact
uses: actions/upload-artifact@v7
with:
name: linux-release-binary
if-no-files-found: error
compression-level: 0
path: ${{ github.workspace }}/bin/simple-linux
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 24
- name: Install npm modules
run: npm i
- name: Import Developer ID certificate
env:
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }}
KEYCHAIN_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PWD }}
run: |
KEYCHAIN_PATH="$RUNNER_TEMP/build.keychain-db"
CERT_PATH="$RUNNER_TEMP/certificate.p12"
echo "$MACOS_CERTIFICATE" | base64 --decode > "$CERT_PATH"
security create-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"
security set-keychain-settings -lut 21600 "$KEYCHAIN_PATH"
security unlock-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"
security import "$CERT_PATH" -P "$MACOS_CERTIFICATE_PWD" \
-k "$KEYCHAIN_PATH" -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple:,codesign: \
-s -k "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"
security list-keychain -d user -s "$KEYCHAIN_PATH" login.keychain-db
rm -f "$CERT_PATH"
- name: Build, sign and notarize macOS binary
env:
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPLE_APP_PASSWORD: ${{ secrets.APPLE_APP_PASSWORD }}
run: npm run build:sea:macos
- name: Upload macOS artifact
uses: actions/upload-artifact@v7
with:
name: macos-release-binary
if-no-files-found: error
compression-level: 0
path: ${{ github.workspace }}/bin/simple-macos
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 24
- uses: actions/setup-go@v7
with:
go-version: 'stable'
- name: Install npm modules
run: npm i
- name: Build Windows binary
run: npm run build:sea:win
- name: Upload Windows artifact
uses: actions/upload-artifact@v7
with:
name: windows-release-binary
if-no-files-found: error
compression-level: 0
path: ${{ github.workspace }}/bin/win/simple-win.exe
release:
needs: [build-linux, build-macos, build-windows]
runs-on: ubuntu-latest
steps:
- name: Download Linux binary
uses: actions/download-artifact@v8
with:
name: linux-release-binary
path: release-files/
- name: Download macOS binary
uses: actions/download-artifact@v8
with:
name: macos-release-binary
path: release-files/
- name: Download Windows binary
uses: actions/download-artifact@v8
with:
name: windows-release-binary
path: release-files/
- name: Get release metadata
id: meta
run: |
echo "date=$(date +'%d/%m/%y %R')" >> "$GITHUB_OUTPUT"
chmod +x release-files/*
- name: Publish to Github
uses: softprops/action-gh-release@v3
with:
prerelease: ${{ inputs.prerelease }}
make_latest: ${{ inputs.prerelease == false }}
tag_name: ${{ inputs.prerelease && 'alpha' || github.ref_name }}
name: ${{ inputs.prerelease && 'Alpha Version' || format('Release {0}', github.ref_name) }}
body: |
${{ inputs.prerelease
&& 'Alpha release of the SIMPLE webplatform. Please test and report issues.'
|| 'Release of the SIMPLE webplatform.' }}
Lastly updated on ${{ steps.meta.outputs.date }}.
generate_release_notes: true
files: release-files/**
fail_on_unmatched_files: true