Skip to content
This repository has been archived by the owner on Feb 20, 2024. It is now read-only.

snapshot-release

snapshot-release #108

name: Create snapshot release
on:
push:
branches:
- develop
repository_dispatch:
types:
- snapshot-release
jobs:
test:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
runs-on: ${{matrix.os}}
steps:
- name: Set up Git repository
uses: actions/checkout@v3
- name: Set up node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Configure Linux environment
if: ${{matrix.os == 'ubuntu-latest'}}
run: sudo apt-get install -y cmake libx11-dev zlib1g-dev libpng-dev libxtst-dev build-essential
- name: Install
run: npm ci
- name: Install latest libnut snapshots
run: |
npm i @nut-tree/libnut-darwin@next
npm i @nut-tree/libnut-linux@next
npm i @nut-tree/libnut-win32@next
- name: Test with latest snapshots
run: npm t
deploy:
needs:
- test
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v3
- name: Set up node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Configure Linux environment
run: sudo apt-get install -y cmake libx11-dev zlib1g-dev libpng-dev libxtst-dev build-essential
- name: Install
run: npm ci
- name: Install latest libnut snapshots
run: |
npm i @nut-tree/libnut-darwin@next
npm i @nut-tree/libnut-linux@next
npm i @nut-tree/libnut-win32@next
- name: Publish snapshot release
run: ./.build/pre-release.sh
shell: bash
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
dispatch:
needs:
- deploy
runs-on: ubuntu-latest
steps:
- name: Dispatch snapshot release
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.SNAPSHOT_DISPATCH_TOKEN }}
repository: nut-tree/nut.js
event-type: snapshot-release