Skip to content

Commit 40493f3

Browse files
committed
Update Windows Deployment
1 parent 2071be9 commit 40493f3

File tree

1 file changed

+38
-38
lines changed

1 file changed

+38
-38
lines changed

.github/workflows/release.yml

+38-38
Original file line numberDiff line numberDiff line change
@@ -95,43 +95,43 @@ jobs:
9595
# Login to Snap Store
9696
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}
9797

98-
# - name: Build Electron app (Windows)
99-
# if: startsWith(matrix.os, 'windows')
100-
# run: |
101-
# yarn run electron:build
98+
- name: Build Electron app (Windows)
99+
if: startsWith(matrix.os, 'windows')
100+
run: |
101+
yarn run electron:build
102102
103-
# - name: Sign built binary (Windows)
104-
# if: startsWith(matrix.os, 'windows')
105-
# # Instead of pointing to a specific .exe, uses a PowerShell script which iterates through all the files stored in dist folder.
106-
# # If the file has the .exe extension, then it will use the AzureSignTool command to sign it.
107-
# run: |
108-
# cd dist; Get-ChildItem -recurse -Include **.exe | ForEach-Object {
109-
# $exePath = $_.FullName
110-
# & 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
111-
# }; cd ..
112-
113-
# - name: Cleanup artifacts (Windows)
114-
# if: startsWith(matrix.os, 'windows')
115-
# run: |
116-
# mkdir dist/temp; Move-Item -Path dist/*.exe, dist/*.blockmap, dist/latest.yml -Destination dist/temp
117-
# npx rimraf "dist/!(temp)"
118-
# npx rimraf "dist/.icon-ico"
119-
# mv dist/temp/* dist
120-
# npx rimraf "dist/temp"
121-
122-
# - name: Upload artifacts (Windows)
123-
# uses: actions/upload-artifact@v2
124-
# if: startsWith(matrix.os, 'windows')
125-
# with:
126-
# name: ${{ matrix.os }}
127-
# path: dist
103+
- name: Sign built binary (Windows)
104+
if: startsWith(matrix.os, 'windows')
105+
# Instead of pointing to a specific .exe, uses a PowerShell script which iterates through all the files stored in dist folder.
106+
# If the file has the .exe extension, then it will use the AzureSignTool command to sign it.
107+
run: |
108+
cd dist; Get-ChildItem -recurse -Include **.exe | ForEach-Object {
109+
$exePath = $_.FullName
110+
& 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
111+
}; cd ..
128112
129-
# - name: Release Electron app (Windows)
130-
# uses: softprops/action-gh-release@v1
131-
# if: startsWith(matrix.os, 'windows')
132-
# with:
133-
# draft: true
134-
# tag_name: v${{ steps.package_json.outputs.version }}
135-
# files: "dist/**"
136-
# env:
137-
# GITHUB_TOKEN: ${{ secrets.github_token }}
113+
- name: Cleanup artifacts (Windows)
114+
if: startsWith(matrix.os, 'windows')
115+
run: |
116+
mkdir dist/temp; Move-Item -Path dist/*.exe, dist/*.blockmap, dist/latest.yml -Destination dist/temp
117+
npx rimraf "dist/!(temp)"
118+
npx rimraf "dist/.icon-ico"
119+
mv dist/temp/* dist
120+
npx rimraf "dist/temp"
121+
122+
- name: Upload artifacts (Windows)
123+
uses: actions/upload-artifact@v2
124+
if: startsWith(matrix.os, 'windows')
125+
with:
126+
name: ${{ matrix.os }}
127+
path: dist
128+
129+
- name: Release Electron app (Windows)
130+
uses: softprops/action-gh-release@v1
131+
if: startsWith(matrix.os, 'windows')
132+
with:
133+
draft: true
134+
tag_name: v${{ steps.package_json.outputs.version }}
135+
files: "dist/**"
136+
env:
137+
GITHUB_TOKEN: ${{ secrets.github_token }}

0 commit comments

Comments
 (0)