aaronm-2112 is building a Windows release for SODA beta #1770
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build-and-deploy-win | |
run-name: ${{ github.actor }} is building a Windows release for SODA beta | |
on: | |
push: | |
branches: | |
- main | |
- staging | |
- pre-staging | |
- azure-trusted-signing | |
jobs: | |
deploy-on-windows: | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniconda-version: "latest" | |
activate-environment: env-electron-python | |
environment-file: tools/anaconda-env/environment-Windows.yml | |
auto-update-conda: true | |
auto-activate-base: false | |
- run: | | |
conda activate env-electron-python | |
conda info | |
conda list | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "lts/hydrogen" | |
- name: Install package.json modules and their dependencies | |
run: npm install --ignore-scripts | |
- name: Build the app for Windows | |
run: npm run build-win | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Get version from package.json | |
id: get_version | |
run: echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV | |
- name: Sign files with Trusted Signing V1.1 | |
uses: azure/[email protected] | |
with: | |
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }} | |
azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }} | |
endpoint: https://eus.codesigning.azure.net/ | |
trusted-signing-account-name: fdih-signing-account | |
certificate-profile-name: california-medical-innovations-institute | |
files: | | |
${{ github.workspace }}\dist\soda-for-sparc-${{env.VERSION}}-setup.exe | |
${{ github.workspace }}\dist\win-unpacked\resources\app.exe | |
file-digest: SHA256 | |
timestamp-rfc3161: http://timestamp.acs.microsoft.com | |
timestamp-digest: SHA256 | |
- name: Create GitHub Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: v{{env.VERSION}} | |
release_name: ${{env.VERSION}} | |
draft: true | |
prerelease: false | |
- name: Upload Signed Setup to Release | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ${{ github.workspace }}\dist\soda-for-sparc-${{env.VERSION}}-setup.exe | |
asset_name: soda-for-sparc-${{env.VERSION}}-setup.exe | |
asset_content_type: application/octet-stream | |
- name: Upload Blockmap to Release | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ${{ github.workspace }}\dist\soda-for-sparc-${{env.VERSION}}-setup.exe.blockmap | |
asset_name: soda-for-sparc-${{env.VERSION}}-setup.exe.blockmap | |
asset_content_type: application/octet-stream | |
- name: Upload yaml to Release | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ${{ github.workspace }}\dist\latest.yml | |
asset_name: latest.yml | |
asset_content_type: application/octet-stream |