Skip to content

Commit

Permalink
Update Windows Deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
crypto-matto committed Jul 5, 2024
1 parent 2071be9 commit 40493f3
Showing 1 changed file with 38 additions and 38 deletions.
76 changes: 38 additions & 38 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,43 +95,43 @@ jobs:
# Login to Snap Store
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}

# - name: Build Electron app (Windows)
# if: startsWith(matrix.os, 'windows')
# run: |
# yarn run electron:build
- name: Build Electron app (Windows)
if: startsWith(matrix.os, 'windows')
run: |
yarn run electron:build
# - name: Sign built binary (Windows)
# if: startsWith(matrix.os, 'windows')
# # Instead of pointing to a specific .exe, uses a PowerShell script which iterates through all the files stored in dist folder.
# # If the file has the .exe extension, then it will use the AzureSignTool command to sign it.
# run: |
# cd dist; Get-ChildItem -recurse -Include **.exe | ForEach-Object {
# $exePath = $_.FullName
# & 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
# }; cd ..

# - name: Cleanup artifacts (Windows)
# if: startsWith(matrix.os, 'windows')
# run: |
# mkdir dist/temp; Move-Item -Path dist/*.exe, dist/*.blockmap, dist/latest.yml -Destination dist/temp
# npx rimraf "dist/!(temp)"
# npx rimraf "dist/.icon-ico"
# mv dist/temp/* dist
# npx rimraf "dist/temp"

# - name: Upload artifacts (Windows)
# uses: actions/upload-artifact@v2
# if: startsWith(matrix.os, 'windows')
# with:
# name: ${{ matrix.os }}
# path: dist
- name: Sign built binary (Windows)
if: startsWith(matrix.os, 'windows')
# Instead of pointing to a specific .exe, uses a PowerShell script which iterates through all the files stored in dist folder.
# If the file has the .exe extension, then it will use the AzureSignTool command to sign it.
run: |
cd dist; Get-ChildItem -recurse -Include **.exe | ForEach-Object {
$exePath = $_.FullName
& 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
}; cd ..
# - name: Release Electron app (Windows)
# uses: softprops/action-gh-release@v1
# if: startsWith(matrix.os, 'windows')
# with:
# draft: true
# tag_name: v${{ steps.package_json.outputs.version }}
# files: "dist/**"
# env:
# GITHUB_TOKEN: ${{ secrets.github_token }}
- name: Cleanup artifacts (Windows)
if: startsWith(matrix.os, 'windows')
run: |
mkdir dist/temp; Move-Item -Path dist/*.exe, dist/*.blockmap, dist/latest.yml -Destination dist/temp
npx rimraf "dist/!(temp)"
npx rimraf "dist/.icon-ico"
mv dist/temp/* dist
npx rimraf "dist/temp"
- name: Upload artifacts (Windows)
uses: actions/upload-artifact@v2
if: startsWith(matrix.os, 'windows')
with:
name: ${{ matrix.os }}
path: dist

- name: Release Electron app (Windows)
uses: softprops/action-gh-release@v1
if: startsWith(matrix.os, 'windows')
with:
draft: true
tag_name: v${{ steps.package_json.outputs.version }}
files: "dist/**"
env:
GITHUB_TOKEN: ${{ secrets.github_token }}

0 comments on commit 40493f3

Please sign in to comment.