Publish #135
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: Publish | |
on: workflow_dispatch | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 14 | |
- run: sudo apt-get install xvfb | |
- run: yarn config set network-timeout 600000 -g | |
- run: yarn | |
- run: yarn lint | |
- run: yarn test | |
- run: yarn compile | |
- run: xvfb-run --auto-servernum --server-args='-screen 0, 1600x900x24' yarn test:spectron-all | |
build: | |
needs: test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 14 | |
- run: node ./buildcfg/check-publish.js | |
- name: write FORNO_API_KEY | |
uses: "DamianReeves/write-file-action@master" | |
with: | |
path: ./src/lib/forno.key.json | |
write-mode: overwrite | |
contents: | | |
{"API_KEY": "${{ secrets.FORNO_API_KEY }}"} | |
- run: sudo apt-get update && sudo apt-get install libudev-dev libusb-1.0-0-dev | |
if: runner.os == 'Linux' | |
- run: yarn config set network-timeout 600000 -g | |
- run: yarn | |
- run: yarn compile | |
- run: yarn electron-builder --mac --publish always | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CSC_LINK: ${{ secrets.OSX_CSC_LINK }} | |
CSC_KEY_PASSWORD: ${{ secrets.OSX_CSC_KEY_PASSWORD }} | |
OSX_NOTARIZE: "TRUE" | |
OSX_APPLE_ID: ${{ secrets.OSX_APPLE_ID }} | |
OSX_APPLE_ID_PASSWORD: ${{ secrets.OSX_APPLE_ID_PASSWORD }} | |
if: runner.os == 'macOS' | |
- run: yarn electron-builder --win --publish always | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CSC_LINK: ${{ secrets.WIN_CSC_LINK }} | |
CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }} | |
if: runner.os == 'Windows' | |
- run: yarn electron-builder --linux --publish always | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
if: runner.os == 'Linux' | |
publish: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 14 | |
- run: node ./buildcfg/finish-publish.js |