Package and publish #157
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: Package and publish | |
on: | |
workflow_dispatch: | |
# push: | |
# tags: | |
# - "*" | |
env: | |
YARN_ENABLE_IMMUTABLE_INSTALLS: false | |
concurrency: | |
group: boson-publish | |
cancel-in-progress: true | |
jobs: | |
publish: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest] | |
env: | |
# These values are used for auto updates signing | |
APPLE_ID: ${{ secrets.APPLE_ID }} | |
APPLE_ID_PASS: ${{ secrets.APPLE_ID_PASSWORD }} | |
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
APPLE_IDENTITY: ${{ secrets.APPLE_IDENTITY }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
DEBUG: electron-packager | |
steps: | |
- name: Checkout git repo | |
uses: actions/checkout@v4 | |
- name: Install Node and NPM | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 21 | |
cache: npm | |
- name: Install Yarn | |
run: npm install -g yarn | |
- name: Brew install dependencies | |
run: | | |
brew install pkg-config cairo pango libpng jpeg giflib librsvg pixman | |
- name: Add MacOS certs | |
run: chmod +x tools/add-macos-cert.sh && ./tools/add-macos-cert.sh | |
env: | |
MACOS_CERT_P12: ${{ secrets.CSC_LINK }} | |
MACOS_CERT_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} | |
- name: Run install | |
run: yarn install | |
# It seems we need to delete the draft release or often it will fail | |
# uploading assets. | |
- name: Delete drafts | |
uses: hugo19941994/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish x64 | |
run: yarn run electron-forge --verbose publish --arch x64 | |
- name: Publish arm64 | |
run: yarn run electron-forge --verbose publish --arch arm64 | |
- name: Publish universal | |
run: yarn run electron-forge --verbose publish --arch universal |