Allow for local macOS signed builds (#4582)

Split up the CreateDMG.sh macos script to two scripts:
MacDeploy.sh - this calls macdeployqt on the built app
CreateDMG.sh - this calls dmgbuild on the built & deployed app

Add a `SKIP_VENV` environment variable to CreateDMG.sh, this can be used to use the system version of dmgbuild
Add the ability to codesign the created dmg and its contents using the `MACOS_CODESIGN_CERTIFICATE` environment variable
Moved the output name logic from CreateDMG to the `OUTPUT_DMG_PATH` environment variable

The nightly release create job also doesn't remove artifacts now, it only replaces artifacts that are conflicting.
The downside to this is that if we change the name of an artifact, we need to manually delete the old artifact.
The upside to this is that we can now upload artifacts that are not handled in the same CI job.
This commit is contained in:
pajlada
2023-04-29 16:07:20 +02:00
committed by GitHub
parent 9c9fa86c45
commit 4c23f4bcea
3 changed files with 73 additions and 25 deletions
+5 -2
View File
@@ -336,12 +336,15 @@ jobs:
- name: Package (MacOS)
if: startsWith(matrix.os, 'macos')
env:
OUTPUT_DMG_PATH: chatterino-macos-Qt-${{ matrix.qt-version}}.dmg
run: |
ls -la
pwd
ls -la build || true
cd build
sh ./../.CI/CreateDMG.sh ${{ matrix.qt-version }}
./../.CI/MacDeploy.sh
./../.CI/CreateDMG.sh
shell: bash
- name: Upload artifact (MacOS)
@@ -439,7 +442,7 @@ jobs:
- name: Create release
uses: ncipollo/release-action@v1.12.0
with:
removeArtifacts: true
replacesArtifacts: true
allowUpdates: true
artifactErrorsFailBuild: true
artifacts: "release-artifacts/*"