Skip to content

(NT-72) Update test for libnut screen action #277

(NT-72) Update test for libnut screen action

(NT-72) Update test for libnut screen action #277

name: Create snapshot release
on:
push:
# branches:
# - develop
# paths-ignore:
# - "**/*.md"
# repository_dispatch:
# types:
# - snapshot-release
workflow_dispatch:
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node: [18]
runs-on: ${{matrix.os}}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- name: Set up Git repository
uses: actions/checkout@v3
- name: Set up node
uses: actions/setup-node@v3
with:
node-version: ${{matrix.node}}
registry-url: https://registry.npmjs.org/
token: ${{ secrets.NPM_TOKEN }}
- name: Setup pnpm
uses: pnpm/[email protected]
- name: Install
run: |
pnpm whoami
pnpm i
- name: Install @nut-tree/libnut@next
run: |
pnpm --filter @nut-tree/libnut i @nut-tree/libnut-darwin@next @nut-tree/libnut-linux@next @nut-tree/libnut-win32@next
- name: Compile
run: pnpm run compile
- name: Run tests
uses: GabrielBB/xvfb-action@v1
with:
run: pnpm run coverage
deploy:
needs:
- test
runs-on: ubuntu-latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- name: Set up Git repository
uses: actions/checkout@v3
- name: Set up node
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org/
token: ${{ secrets.NPM_TOKEN }}
- name: Setup pnpm
uses: pnpm/[email protected]
- name: Install
run: |
pnpm whoami
pnpm i
- name: Install @nut-tree/libnut@next
run: |
pnpm --filter @nut-tree/libnut i @nut-tree/libnut-darwin@next @nut-tree/libnut-linux@next @nut-tree/libnut-win32@next
- name: Create snapshot release
run: bash ./.build/pre-release.sh
- name: Publish snapshot release to npm
run: pnpm run publish:next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}