forked from matiboy/angular2-prettyjson
-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (38 loc) · 1.33 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# This workflow will run tests using node and then publish a package to npm when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: Node.js Publish
on:
workflow_dispatch:
# release:
# types: [created]
# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
# build:
# uses: ./.github/workflows/build.yml
publish-npm:
# needs: build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.11.0]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- name: Check out repo
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
cache: npm
- name: Install dependencies
run: npm ci
- name: Run build only library
run: npm run build --if-present
- name: Publish package
run: npm publish ./dist/angular2-prettyjson
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}