1010
1111jobs :
1212 lint :
13- runs-on : ubuntu-20.04
13+ runs-on : ubuntu-latest
1414 steps :
15- - uses : actions/checkout@v3
15+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1616 - name : Setup Node.js
17- uses : actions/setup-node@v3
17+ uses : actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
1818 with :
19- node-version : lts/*
20- - name : Get yarn cache directory path
21- id : yarn-cache-dir-path
22- run : echo "::set-output name=dir::$(yarn cache dir)"
23- - uses : actions/cache@v3
24- id : yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
25- with :
26- path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
27- key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
28- restore-keys : |
29- ${{ runner.os }}-yarn-
19+ node-version : 20.x
20+ cache : npm
3021 - name : Install
31- run : yarn --frozen-lockfile
22+ run : npm ci
3223 - name : lint
33- run : yarn lint
24+ run : npm run lint
3425 build :
3526 needs : lint
3627 name : Build (${{ matrix.os }} - ${{ matrix.arch }})
3728 runs-on : ${{ matrix.os }}
3829 strategy :
30+ fail-fast : false
3931 matrix :
4032 # Build for supported platforms
4133 # https://github.com/electron/electron-packager/blob/ebcbd439ff3e0f6f92fa880ff28a8670a9bcf2ab/src/targets.js#L9
4234 # 32-bit Linux unsupported as of 2019: https://www.electronjs.org/blog/linux-32bit-support
43- os : [ macOS-latest, ubuntu-20.04 , windows-latest ]
35+ os : [ macOS-latest, ubuntu-latest , windows-latest ]
4436 arch : [ x64, arm64 ]
4537 include :
4638 - os : windows-latest
4739 arch : ia32
48- - os : ubuntu-20.04
40+ - os : ubuntu-latest
4941 arch : armv7l
5042 # Publishing artifacts for multiple Windows architectures has
5143 # a bug which can cause the wrong architecture to be downloaded
@@ -55,36 +47,26 @@ jobs:
5547 arch : arm64
5648
5749 steps :
58- - uses : actions/checkout@v3
50+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5951 - name : Setup Node.js
60- uses : actions/setup-node@v3
61- with :
62- node-version : lts/*
63- - name : Get yarn cache directory path
64- id : yarn-cache-dir-path
65- run : echo "::set-output name=dir::$(yarn cache dir)"
66- - uses : actions/cache@v3
67- if : matrix.os != 'macOS-latest'
68- id : yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
52+ uses : actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
6953 with :
70- path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
71- key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
72- restore-keys : |
73- ${{ runner.os }}-yarn-
54+ node-version : 20.x
55+ cache : npm
7456 - name : Set MacOS signing certs
7557 if : matrix.os == 'macOS-latest'
7658 run : chmod +x tools/add-macos-cert.sh && ./tools/add-macos-cert.sh
7759 env :
7860 MACOS_CERT_P12 : ${{ secrets.MACOS_CERT_P12 }}
7961 MACOS_CERT_PASSWORD : ${{ secrets.MACOS_CERT_PASSWORD }}
80- - name : Set Windows signing certificate
81- if : matrix.os == 'windows-latest'
82- continue-on-error : true
83- id : write_file
84- uses : timheuer/base64-to-file@v1
85- with :
86- fileName : ' win-certificate.pfx '
87- encodedString : ${{ secrets.WINDOWS_CODESIGN_P12 }}
62+ - name : Set up Azure Trusted Signing
63+ if : matrix.os == 'windows-latest' && startsWith(github.ref, 'refs/tags/')
64+ shell : pwsh
65+ run : |
66+ nuget install Microsoft.Trusted.Signing.Client -Version 1.0.60 -OutputDirectory . -NonInteractive
67+ $signtool = Get-ChildItem -Path "C:\Program Files (x86)\Windows Kits\10\bin" -Recurse -Filter signtool.exe | Where-Object { $_.FullName -like "*\x64\*" } | Sort-Object FullName -Descending | Select-Object -First 1
68+ echo "SIGNTOOL_PATH=$($signtool.FullName)" >> $env:GITHUB_ENV
69+ echo "AZURE_CODE_SIGNING_DLIB=$((Resolve-Path 'Microsoft.Trusted.Signing.Client.1.0.60/bin/x64/Azure.CodeSigning.Dlib.dll').Path)" >> $env:GITHUB_ENV
8870 - name : Download disk image (ps1)
8971 run : tools/download-disk.ps1
9072 if : matrix.os == 'windows-latest' && startsWith(github.ref, 'refs/tags/')
@@ -96,22 +78,21 @@ jobs:
9678 env :
9779 DISK_URL : ${{ secrets.DISK_URL }}
9880 - name : Install
99- run : yarn
81+ run : npm ci
10082 - name : Make
10183 if : startsWith(github.ref, 'refs/tags/')
102- run : yarn make --arch=${{ matrix.arch }}
84+ run : npm run make -- --arch=${{ matrix.arch }}
10385 env :
10486 APPLE_ID : ${{ secrets.APPLE_ID }}
10587 APPLE_ID_PASSWORD : ${{ secrets.APPLE_ID_PASSWORD }}
106- WINDOWS_CODESIGN_FILE : ${{ steps.write_file.outputs.filePath }}
107- WINDOWS_CODESIGN_PASSWORD : ${{ secrets.WINDOWS_CODESIGN_PASSWORD }}
108- # - name: Archive production artifacts
109- # uses: actions/upload-artifact@v2
110- # with:
111- # name: ${{ matrix.os }}
112- # path: out/make/**/*
88+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
89+ AZURE_TENANT_ID : ${{ secrets.AZURE_TENANT_ID }}
90+ AZURE_CLIENT_ID : ${{ secrets.AZURE_CLIENT_ID }}
91+ AZURE_CLIENT_SECRET : ${{ secrets.AZURE_CLIENT_SECRET }}
92+ AZURE_CODE_SIGNING_ACCOUNT_NAME : ${{ secrets.AZURE_CODE_SIGNING_ACCOUNT_NAME }}
93+ AZURE_CODE_SIGNING_CERTIFICATE_PROFILE_NAME : ${{ secrets.AZURE_CODE_SIGNING_CERTIFICATE_PROFILE_NAME }}
11394 - name : Release
114- uses : softprops/action-gh-release@v1
95+ uses : softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2.6.1
11596 if : startsWith(github.ref, 'refs/tags/')
11697 env :
11798 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
@@ -122,4 +103,4 @@ jobs:
122103 out/**/*.dmg
123104 out/**/*setup*.exe
124105 out/**/*.rpm
125- out/**/*.zip
106+ out/**/*.zip
0 commit comments