Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix desktop wallet release workflow #268

Closed
wants to merge 11 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 48 additions & 11 deletions .github/workflows/release-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
tags: ['alephium-desktop-wallet@[0-9]+.[0-9]+.[0-9]+*']

jobs:
release-desktop-wallet-unix:
release-desktop-wallet:
runs-on: ${{ matrix.os }}

strategy:
Expand All @@ -31,26 +31,22 @@ jobs:
echo '${{ secrets.api_key }}' > ~/private_keys/AuthKey_${{ secrets.api_key_id }}.p8
echo '${{ secrets.mac_certs }}' | base64 -d > applecert.p12

- name: Get build command arguments
id: get-args
run: |
args=$(if ${{ startsWith(matrix.os, 'macos') }}; then echo '--mac --universal'; else echo ''; fi)
args=$(if ${{ startsWith(matrix.os, 'windows') }}; then echo '-w'; else echo $args; fi)
args=$(if ${{ startsWith(matrix.os, 'ubuntu') }}; then echo '-l'; else echo $args; fi)
echo "args=$args" >> $GITHUB_OUTPUT
- name: Extract platform name
id: get-os
run: echo "os=$(echo ${{ matrix.os }} | cut -d- -f1)" >> $GITHUB_OUTPUT
shell: bash

- name: Install Snapcraft
uses: samuelmeuli/action-snapcraft@v1
if: startsWith(matrix.os, 'ubuntu')

- name: Build & release Electron app
uses: coparse-inc/action-electron-builder@v1.0.0
uses: nop33/action-electron-builder@v1.8.1
if: ${{ startsWith(github.ref, 'refs/tags/alephium-desktop-wallet@') }}
with:
package_root: 'apps/desktop-wallet'
build_script_name: 'ci:build'
args: ${{ steps.get-args.outputs.args }}
is_monorepo: true
build_script_name: 'ci:build:${{ steps.get-os.outputs.os }}'
github_token: ${{ secrets.github_token }}
release: ${{ startsWith(github.ref, 'refs/tags/alephium-desktop-wallet@') }}
mac_certs: ${{ secrets.MAC_CERTS }}
Expand All @@ -61,3 +57,44 @@ jobs:
APPLEID: ${{ secrets.APPLE_ID }}
APPLEIDPASS: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}

- name: Create Artifacts Directory
if: startsWith(matrix.os, 'windows')
shell: bash
run: |
mkdir ${GITHUB_WORKSPACE}/artifacts

- name: Find Alephuim-*.exe file
if: startsWith(matrix.os, 'windows')
id: get-exefile
run: echo "exefile=$(find . -name 'Alephium-*.exe')" >> $GITHUB_OUTPUT
shell: bash

- name: Sign Artifact with CodeSignTool
uses: sslcom/esigner-codesign@develop
if: startsWith(matrix.os, 'windows')
with:
command: sign
username: ${{ secrets.ES_USERNAME }}
password: ${{ secrets.ES_PASSWORD }}
credential_id: ${{ secrets.CREDENTIAL_ID }}
totp_secret: ${{ secrets.ES_TOTP_SECRET }}
file_path: ${{ steps.get-exefile.outputs.exefile }}
output_path: ${GITHUB_WORKSPACE}/artifacts
malware_block: false
environment_name: PROD

- name: Find Alephium-*.exe signed file
if: startsWith(matrix.os, 'windows')
id: get-signedfile
run: |
echo "file=$(find ${GITHUB_WORKSPACE}/artifacts -name 'Alephium-*.exe')" >> $GITHUB_OUTPUT
echo "filename=$(find ${GITHUB_WORKSPACE}/artifacts -name 'Alephium-*.exe' | xargs basename)" >> $GITHUB_OUTPUT
shell: bash

- name: Upload Signed Alephuim-*.exe
uses: actions/upload-artifact@v2
if: startsWith(matrix.os, 'windows')
with:
name: signed-${{ steps.get-signedfile.outputs.filename }}
path: ${{ steps.get-signedfile.outputs.file }}