Skip to content

Create tagged release #20

Create tagged release

Create tagged release #20

Workflow file for this run

name: Create tagged release
on:
push:
tags:
- v*.*.*
jobs:
test:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
node: [ 18 ]
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: ${{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: Compile
run: npm run compile
- name: Run tests
uses: GabrielBB/xvfb-action@v1
with:
run: pnpm run coverage
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
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: Run typedoc
run: pnpm --filter @nut-tree/nut-js run typedoc
- name: Publish typedocs to GitHub Pages
uses: peaceiris/[email protected]
with:
deploy_key: ${{ secrets.API_DOC_DEPLOY_KEY }}
external_repository: nut-tree/apidoc
publish_dir: ./core/nut.js/docs
- name: Publish tagged release to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: actions/setup-node@v3
with:
registry-url: "https://npm.pkg.github.com"
- name: Publish tagged release to GPR
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}