Skip to content

0.20.0

0.20.0 #107

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Release
# Controls when the workflow will run
on:
# Triggers the workflow on push with a tag
push:
tags:
- 'v*'
# Triggers on creation of a release
# release:
# types:
# - created
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
release:
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
matrix:
os: [macos-13, ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- run: npm ci
- name: macOS certificate
if: matrix.os == 'macos-13'
env:
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
run: |
KEY_CHAIN=build.keychain
CERTIFICATE_P12=certificate.p12
echo $APPLE_CERTIFICATE | base64 --decode > $CERTIFICATE_P12
security create-keychain -p actions $KEY_CHAIN
security default-keychain -s $KEY_CHAIN
security unlock-keychain -p actions $KEY_CHAIN
security import $CERTIFICATE_P12 -k $KEY_CHAIN -P $APPLE_CERTIFICATE_PASSWORD -T /usr/bin/codesign;
security set-key-partition-list -S apple-tool:,apple: -s -k actions $KEY_CHAIN
rm -fr *.p12
- name: publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPLE_SIGNING_ID: ${{ secrets.APPLE_SIGNING_ID }}
shell: bash
run: |
npm ci
if [[ "${{ matrix.os }}" != "macos-13" ]]; then
npm run publish
else
npm run publish -- --arch=universal
fi