Skip to content

Commit

Permalink
DX: always test npm package
Browse files Browse the repository at this point in the history
* MAINT: upgrade to `actions/checkout@v4`
  • Loading branch information
redeboer committed Oct 5, 2023
1 parent 6ac48ba commit a518f8f
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,45 @@
name: Node.js Package

on:
push:
branches:
- main
- epic/*
- "[0-9]+.[0-9]+.x"
pull_request:
branches:
- main
- epic/*
- "[0-9]+.[0-9]+.x"
release:
types:
- created
- prereleased
- released
workflow_dispatch:

jobs:
publish:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
registry-url: https://registry.npmjs.org
- run: npm install
- run: npm ci

publish:
if: startsWith(github.ref, 'refs/tags')
needs: build
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org
- run: npm install
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN }}

0 comments on commit a518f8f

Please sign in to comment.