1
mirror of https://github.com/jakejarvis/hugo-extended.git synced 2026-06-13 01:45:29 -04:00

also publish to GitHub Package Registry

This commit is contained in:
2020-05-13 13:14:55 -04:00
parent 0c69508946
commit b0163ab633
2 changed files with 30 additions and 7 deletions
+29 -7
View File
@@ -1,25 +1,47 @@
name: Publish to NPM
name: Publish
on:
release:
types: [published]
jobs:
publish:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- name: npm install and test
run: |
- run: |
npm ci
npm test
env:
CI: true
- name: Publish!
run: npm publish --access public
npm:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
gpr:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://npm.pkg.github.com/
- run: npm ci
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+1
View File
@@ -8,6 +8,7 @@ on:
jobs:
test:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]