Run quality checks for every possible OS because behavior of linting
rules may change per OS (e.g. `linebreak-style` ESLint assertment varies
by Unix-like vs Windows).
Add a new check to ensure project can be built:
1. As both web and desktop applications.
Different jobs are used due to nonidentical environment/mode support.
Reference: nklayman/vue-cli-plugin-electron-builder#1627.
2. Targeting all possible modes.
The modes are configured using `--mode` but electron CLI checks
`NODE_ENV` so it's set as well.
Reference: nklayman/vue-cli-plugin-electron-builder#1626.
3. On and for different operating systems.
Fix typo "Run units" instead of "Run unit tests".
Link to specific GitHub actions page for workflow runs.
Update documentation to match new structure, and change nontransparent
icons from the diagram and consistently use imperative for actions.
Rename `release-site` , `release-git`, `release-desktop` to
`site-release` , `git-release` and `desktop-release` to not be Yoda.
34 lines
1.3 KiB
YAML
34 lines
1.3 KiB
YAML
name: release-desktop
|
|
|
|
on:
|
|
release:
|
|
types: [created] # will be triggered when a NON-draft release is created and published.
|
|
|
|
jobs:
|
|
publish-desktop-app:
|
|
name: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [macos, ubuntu, windows]
|
|
fail-fast: false # So publish runs for other OSes if one fails
|
|
runs-on: ${{ matrix.os }}-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
ref: master # otherwise it defaults to the version tag missing bump commit
|
|
fetch-depth: 0 # fetch all history
|
|
- name: Checkout to bump commit
|
|
run: git checkout "$(git rev-list "${{ github.event.release.tag_name }}"..master | tail -1)"
|
|
- name: Setup node
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: 15.x
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
- name: Run unit tests
|
|
run: npm run test:unit
|
|
- name: Publish desktop app
|
|
run: npm run electron:build -- -p always # https://nklayman.github.io/vue-cli-plugin-electron-builder/guide/recipes.html#upload-release-to-github
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
EP_GH_IGNORE_TIME: true # Otherwise publishing fails if GitHub release is more than 2 hours old https://github.com/electron-userland/electron-builder/issues/2074 |