Skip to content

modify release.yml #913

modify release.yml

modify release.yml #913

Workflow file for this run

name: Test macOS Build
on:
push:
branches:
- macos_build_failure_testing
pull_request:
branches:
- macos_build_failure_testing
workflow_dispatch:
jobs:
test-macos-build:
runs-on: macos-14
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Setup Node.JS
uses: ./.github/actions/nodejs
- name: Install macOS build deps
run: |
brew install llvm coreutils
- name: Set up Docker for macOS
uses: docker-practice/actions-setup-docker@master
- name: Install the Apple certificate
env:
BUILD_CERTIFICATE_BASE64: ${{ secrets.MACOS_BUILD_CERTIFICATE_BASE64 }}
P12_PASSWORD: ${{ secrets.MACOS_P12_PASSWORD }}
KEYCHAIN_PASSWORD: ${{ secrets.MACOS_KEYCHAIN_PASSWORD }}
run: |
# create variables
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
# import certificate and provisioning profile from secrets
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH
# create temporary keychain
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
# import certificate to keychain
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH
- name: Create package
env:
OSX_KEYCHAIN: ${{ runner.temp }}/app-signing.keychain-db
run: "${GITHUB_WORKSPACE}/scripts/pack_dashmate.sh macos"
- name: Notarize MacOS Release Build
run: |
find packages/dashmate/dist/ -name '*.pkg' -exec sh -c 'xcrun notarytool submit "{}" --apple-id "${{ secrets.MACOS_APPLE_ID }}" --team-id "${{ secrets.MACOS_TEAM_ID }}" --password "${{ secrets.MACOS_NOTARIZING_PASSWORD }}" --wait;' \;
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: dashmate-macos
path: packages/dashmate/dist/**