-
Notifications
You must be signed in to change notification settings - Fork 25
47 lines (39 loc) · 1.14 KB
/
npm-version.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
name: Build and publish
on:
push:
branches: [master, main]
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 100
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: "12.x"
registry-url: "https://registry.npmjs.org"
- name: Cache node modules
uses: actions/cache@v1
id: cache
with:
path: node_modules
key: node-modules-${{ hashFiles('**/package-lock.json') }}
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm install
- name: Test app
run: npm run test
- name: Build package
run: npm run build:package
- name: Identify for release
run: |
git config --global user.email "[email protected]"
git config --global user.name "Géry Debongnie"
- name: Automated Version Bump
run: npm run release
- name: Publish tags
run: git push --follow-tags origin main
- name: Publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}