diff --git a/.github/workflows/electron-build.yml b/.github/workflows/electron-build.yml index a67189fc..4bf2ebf9 100644 --- a/.github/workflows/electron-build.yml +++ b/.github/workflows/electron-build.yml @@ -3,7 +3,7 @@ name: App build on: push: branches: - - "0.9.0" + - "code-sign-setup" defaults: run: @@ -19,10 +19,6 @@ jobs: runs-on: windows-latest - env: - CSC_LINK: ${{ secrets.CSC_LINK }} - CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} - # strategy: # fail-fast: false @@ -32,6 +28,10 @@ jobs: with: environment-file: environment.yml activate-environment: watertap-ui-env + + - name: Install Azure Signtool + run: | + dotnet tool install --global AzureSignTool - name: Install Electron JS dependencies run: | @@ -73,13 +73,84 @@ jobs: - name: Build Windows Distribution run: npm --prefix electron run electron-build-win + - name: Sign Windows Distribution + run: | + AzureSignTool sign -kvu "${{ secrets.AZURE_KEY_VAULT_URI }}" -kvi "${{ secrets.AZURE_CLIENT_ID }}" -kvt "${{ secrets.AZURE_TENANT_ID }}" -kvs "${{ secrets.AZURE_CLIENT_SECRET }}" -kvc ${{ secrets.AZURE_CERT_NAME }} -tr http://timestamp.digicert.com -v electron/dist/WaterTAP-UI_09.18.23_win64.exe + + - name: Upload artifact for windows build uses: actions/upload-artifact@v3 if: always() with: name: windows-dist path: | - electron/dist/WaterTAP-UI_Setup.exe + electron/dist/WaterTAP-UI_09.18.23_win64.exe + # windows-build: + # name: Windows Build + + # runs-on: windows-latest + + # env: + # CSC_LINK: ${{ secrets.CSC_LINK }} + # CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} + + # # strategy: + # # fail-fast: false + + # steps: + # - uses: actions/checkout@v3 + # - uses: conda-incubator/setup-miniconda@v2 + # with: + # environment-file: environment.yml + # activate-environment: watertap-ui-env + + # - name: Install Electron JS dependencies + # run: | + # npm --prefix electron clean-install + + # - name: Install frontend JS dependencies + # run: | + # npm --prefix electron/ui clean-install + + # - name: Get idaes extensions + # run: idaes get-extensions + + # # - name: Install Watertap locally + # # working-directory: ../ + # # run: git clone https://github.com/MichaelPesce/watertap.git && cd watertap && git fetch --all && git checkout springmeeting-2023 && pip install --progress-bar off . + + # - name: Install Watertap locally + # working-directory: ../ + # run: git clone https://github.com/watertap-org/watertap.git && cd watertap && git fetch --all --tags && git checkout 0.9.0rc0 && pip install --progress-bar off . + + # - name: Transfer Entry points + # run: | + # npm --prefix electron run move-entrypoints + + # - name: Install watertap-ui Python package + # run: | + # pip install --progress-bar off . + + # - name: Install scipy 1.9.1 + # run: | + # pip uninstall -y scipy && pip install scipy==1.9.1 + + # - name: Build Backend + # run: npm --prefix electron run build-backend + + # - name: Build Frontend + # run: npm --prefix electron run build-frontend-win + + # - name: Build Windows Distribution + # run: npm --prefix electron run electron-build-win + + # - name: Upload artifact for windows build + # uses: actions/upload-artifact@v3 + # if: always() + # with: + # name: windows-dist + # path: | + # electron/dist/WaterTAP-UI_Setup.exe linux-build: name: Linux Build diff --git a/electron/package.json b/electron/package.json index b031d531..5ccbdc62 100644 --- a/electron/package.json +++ b/electron/package.json @@ -1,7 +1,7 @@ { "name": "watertap-ui", "author": "Michael Pesce ", - "version": "0.9.0", + "version": "09.18.23", "private": true, "main": "build/main.js", "dependencies": { @@ -70,7 +70,7 @@ "nsis": { "oneClick": false, "allowToChangeInstallationDirectory": true, - "artifactName": "WaterTAP-UI_Setup.exe" + "artifactName": "WaterTAP-UI_09.18.23_win64.exe" }, "deb": { "depends": [ @@ -105,7 +105,8 @@ }, "win": { "target": "nsis", - "icon": "build/nawi-logo.ico" + "icon": "build/nawi-logo.ico", + "artifactName": "WaterTAP-UI_09.18.23_win64.exe" }, "linux": { "target": "Deb",