From 7ab33eeee275a6039005817fe313aa29a86c977d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Alm=C3=A9n?= <78877636+almenscorner@users.noreply.github.com> Date: Mon, 24 Jun 2024 10:56:28 +0200 Subject: [PATCH] Add manual release run --- .../build_supportcompanion_manual.yml | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 .github/workflows/build_supportcompanion_manual.yml diff --git a/.github/workflows/build_supportcompanion_manual.yml b/.github/workflows/build_supportcompanion_manual.yml new file mode 100644 index 0000000..41a4794 --- /dev/null +++ b/.github/workflows/build_supportcompanion_manual.yml @@ -0,0 +1,85 @@ +name: Build signed Support Companion and upload signed package (manual) + +env: + NOTARY_APP_PASSWORD: ${{ secrets.NOTARY_APP_PASSWORD_MAOS }} + +on: [workflow_dispatch] + +permissions: + contents: write + +jobs: + build: + runs-on: macos-13 + + steps: + - name: Checkout repo + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 + with: + fetch-depth: 0 + + - name: Install Apple Xcode certificates + uses: apple-actions/import-codesign-certs@8f3fb608891dd2244cdab3d69cd68c0d37a7fe93 # v2.0.0 + with: + keychain-password: ${{ github.run_id }} + p12-file-base64: ${{ secrets.APP_CERTIFICATES_P12_MAOS }} + p12-password: ${{ secrets.APP_CERTIFICATES_P12_PASSWORD_MAOS }} + + - name: Install Apple Installer certificates + uses: apple-actions/import-codesign-certs@8f3fb608891dd2244cdab3d69cd68c0d37a7fe93 # v2.0.0 + with: + create-keychain: false # do not create a new keychain for this value + keychain-password: ${{ github.run_id }} + p12-file-base64: ${{ secrets.PKG_CERTIFICATES_P12_MAOS }} + p12-password: ${{ secrets.PKG_CERTIFICATES_P12_PASSWORD_MAOS }} + + - name: Run build package script + run: ./build.sh "$NOTARY_APP_PASSWORD" + + - name: get environment variables + id: get_env_var + run: | + echo "SC_VERSION=$(/bin/cat ./build_info.txt)" >> $GITHUB_ENV + echo "SC_MAIN_VERSION=$(/bin/cat ./build_info_main.txt)" >> $GITHUB_ENV + + - name: Get Changelog Entry + id: changelog_reader + uses: mindsers/changelog-reader-action@b97ce03a10d9bdbb07beb491c76a5a01d78cd3ef # v2.2.2 + with: + validation_depth: 100 + version: ${{ env.SC_MAIN_VERSION }} + + - name: Generate changelog + id: changelog + uses: metcalfc/changelog-generator@afdcb9470aebdb2252c0c95a1c130723c9e21f3a # v4.1 + with: + myToken: ${{ secrets.GITHUB_TOKEN }} + reverse: 'true' + + + - name: Create Release + id: create_release + uses: softprops/action-gh-release@v2 + with: + name: SupportCompanion ${{env.SC_VERSION}} + tag_name: v${{env.SC_VERSION}} + draft: false + prerelease: false + token: ${{ secrets.GITHUB_TOKEN }} + body: | + # Notes + This is a version of Support Companion created by GitHub Actions. + SupportCompanion.app has been signed and notarized. The package has been signed, notarized and stapled. + + # Changelog + ${{ steps.changelog_reader.outputs.changes }} + + # Changes + ${{ steps.changelog.outputs.changelog }} + files: ${{github.workspace}}/Build/build/*.pkg + + - name: Upload packages + uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + with: + name: packages + path: Build/build/ \ No newline at end of file