Skip to content

Refine key definitions #99

Refine key definitions

Refine key definitions #99

name: Create snapshot release
on:
push:
branches:
- develop
workflow_dispatch:
inputs:
reason:
description: 'Reason for the snapshot release'
required: true
default: 'Snapshot release'
jobs:
test:
strategy:
matrix:
os: [ ubuntu-20.04, macos-11, windows-2019 ]
runs-on: ${{matrix.os}}
steps:
- name: Set up Git repository
uses: actions/checkout@v2
- name: Set up node
uses: actions/setup-node@v2
with:
node-version: ${{matrix.node}}
- name: Configure Linux environment
if: ${{matrix.os == 'ubuntu-20.04'}}
run: sudo apt-get install -y cmake libx11-dev zlib1g-dev libpng-dev libxtst-dev build-essential
- name: Install
run: npm run patch && npm i
- name: Build
run: npm run build:release
- name: Run tests
uses: GabrielBB/xvfb-action@v1
with:
working-directory: ./test/
run: npm cit
- name: Run window tests
uses: GabrielBB/xvfb-action@v1
with:
working-directory: ./test/window-integration-tests
run: npm cit
deploy:
needs:
- test
strategy:
matrix:
os: [ ubuntu-20.04, macos-11, windows-2019 ]
runs-on: ${{matrix.os}}
steps:
- name: Set up Git repository
uses: actions/checkout@v2
- name: Set up node
uses: actions/setup-node@v2
with:
node-version: 14
- name: Configure Linux environment
if: ${{matrix.os == 'ubuntu-20.04'}}
run: sudo apt-get install -y cmake libx11-dev zlib1g-dev libpng-dev libxtst-dev build-essential
- name: Install
run: npm run patch && npm i
- name: Publish snapshot release
if: ${{matrix.os == 'ubuntu-20.04' || matrix.os == 'macos-11'}}
run: ./.build/pre-release.sh
shell: bash
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish Windows snapshot release
if: ${{matrix.os == 'windows-2019'}}
run: ./.build/pre-release.ps1
shell: powershell
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
dispatch:
needs:
- deploy
runs-on: ubuntu-20.04
steps:
- name: Dispatch snapshot release
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.SNAPSHOT_DISPATCH_TOKEN }}
repository: nut-tree/libnut-install
event-type: snapshot-release