Github Actions workflow with Notarization #32
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build & Notarize | |
# on: | |
# push: | |
# tags: | |
# - 'v*.*.*' | |
on: "pull_request" # only active during testing | |
jobs: | |
release: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest] | |
steps: | |
# Check for notarytool | |
- name: Check for notarytool | |
run: xcrun --find notarytool | |
# Checkout branch | |
- uses: actions/checkout@v2 | |
# Node.js (for package scripts) | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: "20.11" | |
# Python | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- uses: snok/install-poetry@v1 | |
with: | |
version: "1.7.1" | |
virtualenvs-create: true | |
virtualenvs-in-project: false | |
virtualenvs-path: ~/my-custom-path | |
installer-parallel: true | |
# Install & Build | |
- run: yarn install-deps | |
- run: yarn build:frontend | |
#- run: rm -rf /dist && GH_TOKEN=${{ secrets.github_token}} NODE_ENV=production npm exec --package=electron-builder -- electron-builder build --mac --arm64 --publish always | |
# Prepare distribution release (build and notarize .etc) | |
- name: "Build distribution" | |
env: | |
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} | |
CSC_LINK: ${{ secrets.CSC_LINK }} | |
CSC_FOR_PULL_REQUEST: true | |
APPLE_ID: ${{ secrets.APPLEID }} | |
APPLE_APP_SPECFIC_PASSWORD: ${{ secrets.APPLEIDPASS }} | |
APPLETEAMID: ${{ secrets.APPLETEAMID }} | |
GH_TOKEN: ${{ secrets.github_token}} | |
NODE_ENV: production | |
DEBUG: electron-notarize | |
run: rm -rf /dist && node build.js #npm exec --package=electron-builder -- electron-builder build --mac --arm64 --publish never | |
# # Zip after notarization | |
# - name: Zip distribution | |
# run: | | |
# cd dist/mac-arm64 | |
# ls -lah | |
# ditto -c -k --keepParent "Operate App.app" "Operate App.app.zip" | |
- run: ls -lah | |
- run: ls -lah /dist | |
- run: ls -lah /dist/mac-arm64 | |
# Upload artifact to GitHub repo | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: OperateApp-macOS | |
path: | | |
dist/Olas Operate-0.1.0-rc13-darwin-arm64.dmg |