1
mirror of https://github.com/jakejarvis/hugo-extended.git synced 2025-04-26 15:48:29 -04:00

publish to NPM via action

This commit is contained in:
Jake Jarvis 2020-01-31 08:34:14 -05:00
parent e7cab3ed94
commit 4a2a55ef91
Signed by: jake
GPG Key ID: 2B0C9CF251E69A39
2 changed files with 26 additions and 3 deletions

21
.github/workflows/publish.yml vendored Normal file
View File

@ -0,0 +1,21 @@
name: Publish to NPM
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: node cli.js env
- run: npm test
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

View File

@ -1,8 +1,9 @@
name: Test
name: Run tests
on: [push, pull_request]
jobs:
run:
test:
name: Node ${{ matrix.node }}
runs-on: ubuntu-latest
strategy:
@ -14,5 +15,6 @@ jobs:
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- run: npm install
- run: npm ci
- run: node cli.js env
- run: npm test