Feature/issue#59 add nvmrc #75
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: CI | |
on: | |
push: | |
branches: [ main ] | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+**' | |
pull_request: | |
branches: [ main ] | |
jobs: | |
code-review: | |
runs-on: ubuntu-latest | |
name: Node 16 code-review | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
- run: npm install | |
- run: npx standard | |
unit-test: | |
runs-on: ubuntu-latest | |
name: Node 16 unit-test | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
- run: npm install | |
- run: npm run coverage | |
- name: Codecov | |
uses: codecov/[email protected] | |
build: | |
needs: unit-test | |
if: startsWith(github.ref, 'refs/tags/v') | |
# runs-on: ${{ matrix.os }} | |
runs-on: macos-latest | |
# strategy: | |
# matrix: | |
# os: [macos-latest, ubuntu-latest, windows-latest] | |
name: Build and release the electron app | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v2 | |
- name: Install Node.js, NPM and Yarn | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
- name: Build/release Electron app | |
uses: samuelmeuli/action-electron-builder@v1 | |
with: | |
# GitHub token, automatically provided to the action | |
# (No need to define this secret in the repo settings) | |
github_token: ${{ secrets.github_token }} | |
release: false | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: artifacts | |
path: | | |
dist/*.dmg | |
dist/*.dmg.blockmap | |
release-note: | |
needs: build | |
name: Publish the release note | |
if: startsWith(github.ref, 'refs/tags/v') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v2 | |
- name: Build Changelog | |
id: github_release | |
uses: mikepenz/release-changelog-builder-action@v3 | |
with: | |
configuration: ".github/workflows/changelog.json" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Download build artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: artifacts | |
path: dist | |
- name: Create the release note | |
uses: meeDamian/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
body: ${{ steps.github_release.outputs.changelog }} | |
prerelease: ${{ endsWith(github.ref, '-pre') }} | |
draft: false | |
files: dist/ |