Readded node-gyp #120
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: Release | |
on: | |
push: | |
branches: | |
- "main" | |
workflow_dispatch: | |
jobs: | |
publish: | |
name: "Publish" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [windows-latest, ubuntu-latest] | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v2 | |
- name: Install Node.js and NPM | |
uses: actions/setup-node@master | |
with: | |
node-version: 18 | |
- name: Install dependencies | |
# npm ci is better, but requires package-lock.json file | |
run: npm install | |
- name: Build and release app | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CSC_LINK: ${{ secrets.CSC_LINK }} | |
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} | |
run: npm run release | |
publish_mac: | |
name: "Publish MacOS" | |
runs-on: macos-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v2 | |
- name: Install Node.js and NPM | |
uses: actions/setup-node@master | |
with: | |
node-version: 18 | |
- name: Install node-gyp | |
run: npm install -g node-gyp | |
# Mac building (grandiose - node-gyp) fails just sometimes. | |
- name: Install dependencies | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 10 | |
max_attempts: 10 | |
command: | | |
npm cache clean --force | |
npm install | |
- name: Install dmg-license | |
run: npm i dmg-license | |
- name: Build and release app | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CSC_LINK: ${{ secrets.CSC_LINK }} | |
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} | |
APPLE_ID: ${{ secrets.APPLEID }} | |
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLEIDPASS }} | |
APPLE_TEAM_ID: ${{ secrets.APPLETEAMID }} | |
run: npm run release |