Skip to content

Commit

Permalink
Manually publish to GH & S3
Browse files Browse the repository at this point in the history
  • Loading branch information
cs1m0n committed May 1, 2024
1 parent afc71a0 commit 8f552c6
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 8 deletions.
39 changes: 33 additions & 6 deletions .github/workflows/electron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,51 @@ jobs:
- name: Build for production
run: npm run build:electron

- name: Build the Electron app, do code signing and publish the artifacts for Windows
- name: Build the Electron app & sign the code for Windows
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
npm run package
set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
dotnet tool install --global AzureSignTool --version 5.0.0
AzureSignTool.exe sign -du "https://explorers.biblekids.io" -kvu "https://bccm-code-sign2.vault.azure.net" -kvt "$WINDOWS_DIRECTORY_ID" -kvi "$WINDOWS_CLIENT_ID" -kvs "$WINDOWS_CLIENT_PASSWORD" -kvc "HSM-CS" -tr "http://timestamp.digicert.com" -v "dist-app/Bible-Explorers-Setup-1.6.14.exe"
npm run publish
AzureSignTool.exe sign -du "https://explorers.biblekids.io" -kvu "https://bccm-code-sign2.vault.azure.net" -kvt "$WINDOWS_DIRECTORY_ID" -kvi "$WINDOWS_CLIENT_ID" -kvs "$WINDOWS_CLIENT_PASSWORD" -kvc "HSM-CS" -tr "http://timestamp.digicert.com" -v "dist-app/Bible-Explorers-Setup-1.6.15.exe"
fi
shell: bash
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WINDOWS_DIRECTORY_ID: ${{secrets.BCCM_WINDOWS_DIRECTORY_ID}}
WINDOWS_CLIENT_ID: ${{secrets.BCCM_WINDOWS_CLIENT_ID}}
WINDOWS_CLIENT_PASSWORD: ${{secrets.BCCM_WINDOWS_CLIENT_PASSWORD}}

- name: Create release on GitHub for Windows
uses: actions/create-release@v1
if: matrix.os.name == 'windows'
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Upload assets to GitHub for Windows
uses: actions/upload-release-asset@v1
if: matrix.os.name == 'windows'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist-app/*
asset_content_type: application/octet-stream

- name: Upload to Amazon S3 for Windows
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
aws s3 cp ./dist-app/* s3://bccm-static/explorers/ --region eu-north-1
fi
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: Download certificate file & build the Electron app for Mac
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
Expand Down
1 change: 0 additions & 1 deletion electron_builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const config = {
win: {
target: 'nsis',
publisherName: 'BCC MEDIA STI',
verifyUpdateCodeSignature: false, // Disable publisher name check until we get the signature in place for Windows
legalTrademarks: '(C) 2024 BCC MEDIA STI',
},
mac: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bible-explorers",
"version": "1.6.14",
"version": "1.6.15",
"description": "App for Bible Explorers",
"main": ".vite/build/main.js",
"repository": {
Expand Down

0 comments on commit 8f552c6

Please sign in to comment.