File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
22# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
33
4- name : Build and publish Angular library
4+ name : Angular library
55
66on :
77 push :
88 branches : [ master ]
9+ pull_request :
10+ branches : [ master ]
911
1012jobs :
1113 build :
14+
1215 runs-on : ubuntu-latest
1316
1417 strategy :
2427 - run : npm ci
2528 - run : npm run lint
2629 - run : npm run build:prod
27-
28- npm-publish :
29- needs : build
30- name : Publish to NPM
31- runs-on : ubuntu-latest
32- steps :
33- - name : Checkout repository
34- uses : actions/checkout@v2
35- - name : Set up Node.js
36- uses : actions/setup-node@v1
37- with :
38- node-version : ' 12'
39- - run : npm ci
40- - run : npm run lint
41- - run : npm run build:prod
42- - name : Publish if version has been updated
43- uses : pascalgn/npm-publish-action@1.3.3
44- with :
45- tag_name : " v%s"
46- tag_message : " v%s"
47- commit_pattern : " ^Release (\\ S+)" # Only publish when a commit is created that starts with "Release ..."
48- workspace : " ./dist/muuri-angular"
49- env :
50- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
51- NPM_AUTH_TOKEN : ${{ secrets.NPM_AUTH_TOKEN }}
Original file line number Diff line number Diff line change 1+ name : npm-publish
2+ on :
3+ push :
4+ tags :
5+ - v*.*.*
6+
7+ jobs :
8+ npm-publish :
9+ name : npm-publish
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Checkout repository
13+ uses : actions/checkout@master
14+ - name : Set up Node.js
15+ uses : actions/setup-node@v1
16+ with :
17+ node-version : ' 12'
18+ registry-url : ' https://registry.npmjs.org'
19+ - name : Install dependencies
20+ run : npm ci
21+ - name : Build library
22+ run : npm run build:prod
23+ - name : Publish version
24+ run : cd ./dist/muuri-angular && npm publish
25+ env :
26+ NODE_AUTH_TOKEN : ${{ secrets.NPM_AUTH_TOKEN }}
You can’t perform that action at this time.
0 commit comments