-
Notifications
You must be signed in to change notification settings - Fork 1
159 lines (159 loc) · 4.76 KB
/
pack.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
name: Publish
on:
push:
branches:
- master
- electron20
paths:
- RELEASE_NOTES.md
- .github/workflows/pack.yml
jobs:
mac_arm64:
name: OSX (arm64)
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.11.8'
- name: Add Cert to Keychain
uses: apple-actions/import-codesign-certs@v3
with:
p12-file-base64: ${{ secrets.MAC_CERT_BASE64 }}
p12-password: ${{ secrets.MAC_CERT_PASSWORD }}
- name: Npm Install
working-directory: Aardium
run: npm install
- name: Package
working-directory: Aardium
run: npm run dist:darwin:arm64
env:
MAC_CERT_BASE64: ${{ secrets.MAC_CERT_BASE64 }}
MAC_CERT_PASSWORD: ${{ secrets.MAC_CERT_PASSWORD }}
MAC_DEV_PASSWORD: ${{ secrets.MAC_DEV_PASSWORD }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Aardium
uses: actions/upload-artifact@v4
with:
name: mac_arm64
path: Aardium/dist/Aardium-Darwin-arm64.tar.gz
mac_x64:
name: OSX (x64)
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.11.8'
- name: Add Cert to Keychain
uses: apple-actions/import-codesign-certs@v3
with:
p12-file-base64: ${{ secrets.MAC_CERT_BASE64 }}
p12-password: ${{ secrets.MAC_CERT_PASSWORD }}
- name: Npm Install
working-directory: Aardium
run: npm install
- name: Package
working-directory: Aardium
run: npm run dist:darwin:x64
env:
MAC_CERT_BASE64: ${{ secrets.MAC_CERT_BASE64 }}
MAC_CERT_PASSWORD: ${{ secrets.MAC_CERT_PASSWORD }}
MAC_DEV_PASSWORD: ${{ secrets.MAC_DEV_PASSWORD }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Aardium
uses: actions/upload-artifact@v4
with:
name: mac_x64
path: Aardium/dist/Aardium-Darwin-x64.tar.gz
linux_x64:
name: Linux (x64)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Npm Install
working-directory: Aardium
run: npm install
- name: Package
working-directory: Aardium
run: npm run dist:linux:x64
- name: Upload Aardium
uses: actions/upload-artifact@v4
with:
name: linux_x64
path: Aardium/dist/Aardium-Linux-x64.tar.gz
win32_x64:
name: Windows (x64)
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Npm Install
working-directory: Aardium
run: npm install
- name: Package
working-directory: Aardium
run: npm run dist:win32:x64
- name: Upload Aardium
uses: actions/upload-artifact@v4
with:
name: win32_x64
path: Aardium/dist/Aardium-win32-x64
final:
name: Package
needs:
- mac_arm64
- mac_x64
- win32_x64
- linux_x64
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download OSX dependencies (x64)
uses: actions/download-artifact@v4
with:
name: mac_x64
path: Aardium/dist/Aardium-Darwin-x64.tar.gz
- name: Download OSX dependencies (arm64)
uses: actions/download-artifact@v4
with:
name: mac_arm64
path: Aardium/dist/Aardium-Darwin-arm64.tar.gz
- name: Download Linux dependencies (x64)
uses: actions/download-artifact@v4
with:
name: linux_x64
path: Aardium/dist/Aardium-Linux-x64.tar.gz
- name: Download Windows dependencies (x64)
uses: actions/download-artifact@v4
with:
name: win32_x64
path: Aardium\dist\Aardium-win32-x64
- name: Install Dotnet
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Restore Tools
run: dotnet tool restore
- name: Restore
run: dotnet paket restore
- name: Pack
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: dotnet aardpack src\Aardium.sln --notag
- name: Upload Package
uses: actions/upload-artifact@v4
with:
name: packages
path: bin\pack
- name: NuGet
env:
NUGET_KEY: ${{ secrets.NUGET_KEY }}
shell: cmd
run: dotnet nuget push "bin\pack\*.nupkg" -k %NUGET_KEY% -s "https://api.nuget.org/v3/index.json" --skip-duplicate