mirror of
https://github.com/Kong/insomnia
synced 2024-11-07 22:30:15 +00:00
chore: split packaging for windows builds [INS-3983] (#7838)
* chore: split package for windows codesign [INS-3983] * fix * fix * fix * prepare for proper release-build pipeline * tidy up
This commit is contained in:
parent
be8a04c95f
commit
1067afab4a
48
.github/workflows/release-build.yml
vendored
48
.github/workflows/release-build.yml
vendored
@ -66,6 +66,10 @@ jobs:
|
||||
- name: Install packages
|
||||
run: npm ci
|
||||
|
||||
- name: Setup Inso CLI version env var
|
||||
run: |
|
||||
echo "INSO_VERSION=$(jq .version ./packages/${{ env.INSO_PACKAGE_NAME }}/package.json -rj)" >> $GITHUB_ENV
|
||||
|
||||
# If this step fails its possible apple has new license terms which need to be accepted by logging into https://developer.apple.com/account
|
||||
- name: Package app (MacOS only)
|
||||
if: matrix.os == 'macos-13'
|
||||
@ -78,16 +82,50 @@ jobs:
|
||||
CSC_LINK: ${{ matrix.csc_link_secret != '' && secrets[matrix.csc_link_secret] || '' }}
|
||||
CSC_KEY_PASSWORD: ${{ matrix.csc_key_password_secret != '' && secrets[matrix.csc_key_password_secret] || '' }}
|
||||
|
||||
- name: Package app (Windows and Linux)
|
||||
if: matrix.os != 'macos-13'
|
||||
- name: Package app (Linux only)
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
shell: bash
|
||||
run: npm run app-package
|
||||
env:
|
||||
NODE_OPTIONS: '--max_old_space_size=6144'
|
||||
|
||||
- name: Setup Inso CLI version env var
|
||||
run:
|
||||
echo "INSO_VERSION=$(jq .version ./packages/${{ env.INSO_PACKAGE_NAME }}/package.json -rj)" >> $GITHUB_ENV
|
||||
# creates unpacked electron-builder contents that can be signed afterwards
|
||||
- name: Package unpacked app (Windows only)
|
||||
if: matrix.os == 'windows-latest'
|
||||
shell: bash
|
||||
run: NODE_OPTIONS='--max_old_space_size=6144' npm run package:windows:unpacked -w insomnia
|
||||
|
||||
# signs unpacked electron-builder contents, in this case only the .exe
|
||||
- name: Code-sign unpacked .exe (Windows only)
|
||||
if: matrix.os == 'windows-latest'
|
||||
uses: sslcom/esigner-codesign@develop
|
||||
with:
|
||||
command: sign
|
||||
username: ${{secrets.ES_USERNAME}}
|
||||
password: ${{secrets.ES_PASSWORD}}
|
||||
credential_id: ${{secrets.ES_CREDENTIAL_ID}}
|
||||
totp_secret: ${{secrets.ES_TOTP_SECRET}}
|
||||
file_path: packages/insomnia/dist/win-unpacked/Insomnia.exe
|
||||
override: true
|
||||
|
||||
# re-packages the now code-signed electron-builder contents into a squirrel installer
|
||||
- name: Package dist app (Windows only)
|
||||
if: matrix.os == 'windows-latest'
|
||||
shell: bash
|
||||
run: NODE_OPTIONS='--max_old_space_size=6144' npm run package:windows:dist -w insomnia
|
||||
|
||||
# code-signs the windows installer
|
||||
- name: Code-sign Windows Installer artifact (Windows only)
|
||||
if: matrix.os == 'windows-latest'
|
||||
uses: sslcom/esigner-codesign@develop
|
||||
with:
|
||||
command: sign
|
||||
username: ${{secrets.ES_USERNAME}}
|
||||
password: ${{secrets.ES_PASSWORD}}
|
||||
credential_id: ${{secrets.ES_CREDENTIAL_ID}}
|
||||
totp_secret: ${{secrets.ES_TOTP_SECRET}}
|
||||
file_path: packages/insomnia/dist/squirrel-windows/Insomnia.Core-${{ env.INSO_VERSION }}.exe
|
||||
override: true
|
||||
|
||||
- name: Package inso
|
||||
run: |
|
||||
|
11
.github/workflows/release-publish.yml
vendored
11
.github/workflows/release-publish.yml
vendored
@ -86,17 +86,6 @@ jobs:
|
||||
with:
|
||||
path: ${{ env.ELECTRON_ARTIFACT_BASE64_FILE }}
|
||||
|
||||
- name: Code-sign Windows .exe artifact
|
||||
uses: sslcom/esigner-codesign@develop
|
||||
with:
|
||||
command: sign
|
||||
username: ${{secrets.ES_USERNAME}}
|
||||
password: ${{secrets.ES_PASSWORD}}
|
||||
credential_id: ${{secrets.ES_CREDENTIAL_ID}}
|
||||
totp_secret: ${{secrets.ES_TOTP_SECRET}}
|
||||
file_path: ${GITHUB_WORKSPACE}/artifacts/windows-latest-artifacts/insomnia/dist/squirrel-windows/Insomnia.Core-${{ env.RELEASE_VERSION }}.exe
|
||||
override: true
|
||||
|
||||
- name: Create Tag and Release
|
||||
uses: ncipollo/release-action@v1
|
||||
id: core_tag_and_release
|
||||
|
@ -22,6 +22,8 @@
|
||||
"build:main.min.js": "cross-env NODE_ENV=development esr esbuild.main.ts",
|
||||
"lint": "eslint . --ext .js,.ts,.tsx --cache",
|
||||
"package": "npm run build:app && cross-env USE_HARD_LINKS=false electron-builder build --config electron-builder.config.js",
|
||||
"package:windows:unpacked": "npm run build:app && cross-env USE_HARD_LINKS=false electron-builder build --config electron-builder.config.js --dir",
|
||||
"package:windows:dist": "cross-env USE_HARD_LINKS=false electron-builder build --config electron-builder.config.js --prepackaged ./dist/win-unpacked",
|
||||
"start": "concurrently -n browser,main --kill-others \"npm run start:dev-server\" \"npm run start:electron\"",
|
||||
"start:dev-server": "vite dev",
|
||||
"start:electron": "cross-env NODE_ENV=development esr esbuild.main.ts && electron --inspect=5858 .",
|
||||
|
Loading…
Reference in New Issue
Block a user