mirror of
https://github.com/jakejarvis/hugo-extended.git
synced 2025-04-27 08:58:30 -04:00
publish to NPM via action
This commit is contained in:
parent
e7cab3ed94
commit
4a2a55ef91
21
.github/workflows/publish.yml
vendored
Normal file
21
.github/workflows/publish.yml
vendored
Normal 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 }}
|
8
.github/workflows/test.yml
vendored
8
.github/workflows/test.yml
vendored
@ -1,8 +1,9 @@
|
|||||||
name: Test
|
name: Run tests
|
||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
test:
|
||||||
name: Node ${{ matrix.node }}
|
name: Node ${{ matrix.node }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
@ -14,5 +15,6 @@ jobs:
|
|||||||
- uses: actions/setup-node@v1
|
- uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node }}
|
node-version: ${{ matrix.node }}
|
||||||
- run: npm install
|
- run: npm ci
|
||||||
|
- run: node cli.js env
|
||||||
- run: npm test
|
- run: npm test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user