-
Notifications
You must be signed in to change notification settings - Fork 49
182 lines (176 loc) · 6.28 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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
name: CI
on: [pull_request, push]
jobs:
build-mac:
name: Build - macOS
runs-on: macos-13
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: '18.x'
- uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
- run: ./gradlew build updateVersions updateAllDependencies -PbuildServer
name: Build with Gradle
- run: |
npm install
npm run compile
npm run lint
npm run packageMac
name: Build Standalone Utility
working-directory: wpilib-utility-standalone
- name: Import Developer ID Certificate
uses: wpilibsuite/import-signing-certificate@v2
with:
certificate-data: ${{ secrets.APPLE_CERTIFICATE_DATA }}
certificate-passphrase: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
keychain-password: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }}
if: |
(github.repository_owner == 'wpilibsuite') &&
(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
- name: Sign Standalone Utility
run: npm run signMac
working-directory: wpilib-utility-standalone
if: |
(github.repository_owner == 'wpilibsuite') &&
(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
- name: Notarize Standalone Utility
uses: wpilibsuite/xcode-notarize@v3
with:
product-path: "wpilib-utility-standalone/build/wpilibutility-darwin-universal/wpilibutility.app"
appstore-connect-username: ${{ secrets.APPLE_NOTARIZATION_USERNAME }}
appstore-connect-teamid: ${{ secrets.APPLE_NOTARIZATION_TEAMID }}
appstore-connect-password: ${{ secrets.APPLE_NOTARIZATION_PASSWORD }}
if: |
(github.repository_owner == 'wpilibsuite') &&
(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
- name: Staple Notarization Ticket
run: xcrun stapler staple -v wpilibutility.app
working-directory: wpilib-utility-standalone/build/wpilibutility-darwin-universal
if: |
(github.repository_owner == 'wpilibsuite') &&
(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
- run: tar -C build/wpilibutility-darwin-universal -pcvzf wpilibutility-mac.tar.gz .
working-directory: wpilib-utility-standalone
name: Create Archive
- uses: actions/upload-artifact@v4
with:
name: Mac
path: ${{ github.workspace }}/wpilib-utility-standalone/wpilibutility-mac.tar.gz
build-linux:
name: Build - Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: '18.x'
- uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
- run: ./gradlew build updateVersions updateAllDependencies -PbuildServer
name: Build with Gradle
- run: |
npm install
npm run compile
npm run lint
npm run packageLinux
name: Build Standalone Utility
working-directory: wpilib-utility-standalone
- run: tar -C build/wpilibutility-linux-x64 -pcvzf wpilibutility-linux.tar.gz .
working-directory: wpilib-utility-standalone
name: Archive Utility
- uses: actions/upload-artifact@v4
with:
name: Linux
path: ${{ github.workspace }}/wpilib-utility-standalone/wpilibutility-linux.tar.gz
build-windows:
name: Build - Windows Standalone
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: '18.x'
- uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
- run: ./gradlew build updateVersions updateAllDependencies -PbuildServer
name: Build with Gradle
- run: |
npm install
npm run compile
npm run lint
npm run packageWindows
name: Build Standalone Utility
working-directory: wpilib-utility-standalone
- run: Compress-Archive -Path wpilibutility-win32-x64\* -DestinationPath wpilibutility-windows.zip
working-directory: wpilib-utility-standalone/build
shell: powershell
- uses: actions/upload-artifact@v4
with:
name: WindowsStandalone
path: ${{ github.workspace }}/wpilib-utility-standalone/build/wpilibutility-windows.zip
build-windows-vsix:
name: Build - Windows VSIX
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: '18.x'
- uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
- run: ./gradlew build updateVersions updateAllDependencies generateTemplateZip generateExamplesZip -PbuildServer
name: Build with Gradle
- run: |
npm install
npm run lint
npm run unittest
npm run gulp
npm run webpack
npm run vscePackage
working-directory: vscode-wpilib
name: Build VSIX
- uses: actions/upload-artifact@v4
with:
name: WindowsVSIX
path: ${{ github.workspace }}/**/*.vsix
- uses: actions/upload-artifact@v4
with:
name: Distributions
path: ${{ github.workspace }}/build/distributions/*
release:
name: "Release"
runs-on: ubuntu-latest
needs: [build-mac, build-linux, build-windows, build-windows-vsix]
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
name: Download Artifacts
with:
path: artifacts
- uses: softprops/action-gh-release@v1
name: Release
with:
body_path: ${{ github.workspace }}/.github/ReleaseBody.txt
prerelease: true
files: "artifacts/**/*"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}