-
Notifications
You must be signed in to change notification settings - Fork 47
71 lines (71 loc) · 2.16 KB
/
executable.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
name: Build Executables
on:
release:
types: [published]
jobs:
build:
name: Build Executables
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v4
with:
node-version: 14
architecture: x64
- run: ./scripts/executable.sh
env:
APPLE_DEV_CERT: ${{secrets.APPLE_DEV_CERT}}
APPLE_ID_USERNAME: ${{secrets.APPLE_ID_USERNAME}}
APPLE_ID_KEY: ${{secrets.APPLE_ID_KEY}}
APPLE_CERT_KEY: ${{secrets.APPLE_CERT_KEY}}
APPLE_TEAM_ID: ${{secrets.APPLE_TEAM_ID}}
- name: Verify executable
run: ./percy --version
- name: Upload win artifact
uses: actions/upload-artifact@v4
with:
name: win-exe
path: percy.exe
- name: Upload assets
uses: softprops/action-gh-release@01570a1f39cb168c169c802c3bceb9e93fb10974
with:
files: |
percy-osx.zip
percy-linux.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
notify:
needs: build
name: Sign Win Executable
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Download win artifact
uses: actions/download-artifact@v4
with:
name: win-exe
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 14
- name: Install resedit
run: npm install resedit
- name: Update exe metadata
run: node ./scripts/win-metadata-update.js
- name: Sign binary
uses: lando/code-sign-action@v3
with:
file: ./percy.exe
certificate-data: ${{ secrets.WINDOWS_CERT }}
certificate-password: ${{ secrets.WINDOWS_CERT_KEY }}
- name: Verify executable
run: ./percy.exe --version
- run: |
powershell -Command "Compress-Archive -Path 'percy.exe' -DestinationPath 'percy-win.zip'"
- name: Upload assets
uses: softprops/action-gh-release@01570a1f39cb168c169c802c3bceb9e93fb10974
with:
files: |
percy-win.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}