Skip to content

Bump npm from 9.8.1 to 10.0.0 in /reference-lib #28

Bump npm from 9.8.1 to 10.0.0 in /reference-lib

Bump npm from 9.8.1 to 10.0.0 in /reference-lib #28

name: Publish reference lib package to GitHub Packages
on:
push:
branches: ['main']
paths: ['reference-lib/**']
pull_request:
branches: ['main']
paths: ['reference-lib/**']
defaults:
run:
working-directory: ./reference-lib
shell: bash
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://npm.pkg.github.com'
scope: '@nginxinc'
- name: Install dependencies
run: npm ci
- name: Test it out
run: npm run test
- name: Bundle using rollup
run: npm run build
- name: get package-version
run: node -p -e '`PACKAGE_VERSION=${require("./package.json").version}`' >> $GITHUB_ENV
- name: publish package
if: github.event_name == 'push'
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create and push tag
if: github.event_name == 'push'
uses: mathieudutour/github-tag-action@v6.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ env.PACKAGE_VERSION }}