Skip to content

Commit 18fd34e

Browse files
committed
fix: snapcraft login
1 parent 8f6ebbb commit 18fd34e

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

.github/workflows/release-test.yml

+14-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Only run on feat/windows-cert-signing push
1+
# Only run on master push
22
name: Release Executables Binaries
33

44
on:
@@ -27,21 +27,19 @@ jobs:
2727
- name: Install Node.js, NPM and Yarn
2828
uses: actions/setup-node@v1
2929
with:
30-
node-version: 18
30+
node-version: 16
3131

3232
- name: Install deps with big timeout
3333
run: |
3434
yarn install --network-timeout 600000
35+
3536
- name: Install Snapcraft
36-
uses: samuelmeuli/action-snapcraft@v1
37+
uses: samuelmeuli/action-snapcraft@v2
3738
# Only install Snapcraft on Ubuntu
3839
if: startsWith(matrix.os, 'ubuntu')
39-
with:
40-
# Log in to Snap Store
41-
snapcraft_token: ${{ secrets.snapcraft_token }}
4240

4341
- name: Install AzureSignTool
44-
# Only install Azure Sign Tool on Windows
42+
# Only install Azure Sign Tool on Windows
4543
if: startsWith(matrix.os, 'windows')
4644
run: dotnet tool install --global AzureSignTool
4745

@@ -65,12 +63,14 @@ jobs:
6563
echo name: ${{ steps.package_json.outputs.name }}
6664
echo version: ${{ steps.package_json.outputs.version }}
6765
echo "********* END RELEASE REF ************"
66+
6867
- name: Prepare for app notarization (MacOS)
6968
if: startsWith(matrix.os, 'macos')
7069
# Import Apple API key for app notarization on macOS
7170
run: |
7271
mkdir -p ~/private_keys/
7372
echo '${{ secrets.mac_api_key }}' > ~/private_keys/AuthKey_${{ secrets.mac_api_key_id }}.p8
73+
7474
- name: Build/release Electron app (MacOS, Ubuntu, Windows)
7575
uses: samuelmeuli/action-electron-builder@v1
7676
if: startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'ubuntu')
@@ -92,11 +92,14 @@ jobs:
9292
# macOS notarization API key
9393
API_KEY_ID: ${{ secrets.mac_api_key_id }}
9494
API_KEY_ISSUER_ID: ${{ secrets.mac_api_key_issuer_id }}
95-
95+
# Login to Snap Store
96+
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}
97+
9698
- name: Build Electron app (Windows)
9799
if: startsWith(matrix.os, 'windows')
98100
run: |
99101
yarn run electron:build
102+
100103
- name: Sign built binary (Windows)
101104
if: startsWith(matrix.os, 'windows')
102105
# Instead of pointing to a specific .exe, uses a PowerShell script which iterates through all the files stored in dist folder.
@@ -106,6 +109,7 @@ jobs:
106109
$exePath = $_.FullName
107110
& AzureSignTool sign -kvu "${{ secrets.azure_key_vault_url }}" -kvi "${{ secrets.azure_key_vault_client_id }}" -kvt "${{ secrets.azure_key_vault_tenant_id }}" -kvs "${{ secrets.azure_key_vault_client_secret }}" -kvc "${{ secrets.azure_key_vault_name }}" -tr http://timestamp.digicert.com -v $exePath
108111
}; cd ..
112+
109113
- name: Cleanup artifacts (Windows)
110114
if: startsWith(matrix.os, 'windows')
111115
run: |
@@ -114,6 +118,7 @@ jobs:
114118
npx rimraf "dist/.icon-ico"
115119
mv dist/temp/* dist
116120
npx rimraf "dist/temp"
121+
117122
- name: Upload artifacts (Windows)
118123
uses: actions/upload-artifact@v2
119124
if: startsWith(matrix.os, 'windows')
@@ -129,4 +134,4 @@ jobs:
129134
tag_name: v${{ steps.package_json.outputs.version }}
130135
files: "dist/**"
131136
env:
132-
GITHUB_TOKEN: ${{ secrets.github_token }}
137+
GITHUB_TOKEN: ${{ secrets.github_token }}

0 commit comments

Comments
 (0)