adds prettier #13
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, Lint, and Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
pull_request: | |
branches: | |
- '**' | |
jobs: | |
build: | |
runs-on: macos-latest | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
APP_VERSION: ${{ github.ref_name }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- name: Set app version | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
echo "Setting app version to $APP_VERSION" | |
npm version ${{ github.ref_name }} --no-git-tag-version | |
- name: Install dependencies | |
run: npm install | |
- name: Run linter | |
run: npm run lint | |
continue-on-error: true | |
- name: Check formatting | |
run: npx prettier --check . | |
continue-on-error: true | |
- name: Build the app | |
run: npm run build | |
- name: Package the app | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
npx electron-builder --mac --universal --publish always |