1
mirror of https://github.com/jakejarvis/hugo-extended.git synced 2025-11-17 08:30:51 -05:00

also publish to GitHub Package Registry

This commit is contained in:
2021-07-05 11:27:23 -04:00
parent bfce04e7e5
commit 2a39900b8a

View File

@@ -1,20 +1,39 @@
name: Publish to NPM
on:
release:
types: [published]
push:
tags:
- 'v*'
jobs:
npm:
name: Publish to NPM
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12
node-version: 14
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm audit && npm test
- run: npm publish
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
gpr:
name: Publish to GitHub Package Registry
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
registry-url: https://npm.pkg.github.com/
scope: '@jakejarvis'
- run: npm ci
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}