File tree Expand file tree Collapse file tree 1 file changed +21
-30
lines changed Expand file tree Collapse file tree 1 file changed +21
-30
lines changed Original file line number Diff line number Diff line change 1- on : push
2- name : Build and Publish
1+ name : npm-publish
2+ on :
3+ push :
4+ branches :
5+ - master # Change this to your default branch
36jobs :
4- all :
5- name : Build and Publish
7+ npm-publish :
8+ name : npm-publish
69 runs-on : ubuntu-latest
710 steps :
8- - uses : actions/checkout@master
9- - name : Shell Linter
10- uses : azohra/shell-linter@v0.3.0
11- - name : Docker Lint
12- uses : luke142367/Docker-Lint-Action@v1.0.0
13- env :
14- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
15- TARGET : Dockerfile
16- - name : Build Docker
17- run : docker build -t test .
18- - name : Cache node_modules
19- id : cache-modules
20- uses : actions/cache@v1
11+ - name : Checkout repository
12+ uses : actions/checkout@master
13+ - name : Set up Node.js
14+ uses : actions/setup-node@master
2115 with :
22- path : node_modules
23- key : ${{ runner.OS }}-build-${{ hashFiles('package.json') }}
24- - name : Build
25- if : steps.cache-modules.outputs.cache-hit != 'true'
26- run : npm install
27- - name : Test
28- run : npm test
29- - name : Publish
30- if : github.ref == 'refs/heads/master'
31- uses : mikeal/merge-release@master
32- env :
33- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
34- NPM_AUTH_TOKEN : ${{ secrets.NPM_AUTH_TOKEN }}
16+ node-version : 10.0.0
17+ - name : Publish if version has been updated
18+ uses : pascalgn/npm-publish-action@4f4bf159e299f65d21cd1cbd96fc5d53228036df
19+ with : # All of theses inputs are optional
20+ tag_name : " v%s"
21+ tag_message : " v%s"
22+ commit_pattern : " ^Release (\\ S+)"
23+ env : # More info about the environment variables in the README
24+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Leave this as is, it's automatically generated
25+ NPM_AUTH_TOKEN : ${{ secrets.NPM_AUTH_TOKEN }} # You need to set this in your repo settings
You can’t perform that action at this time.
0 commit comments