-
Notifications
You must be signed in to change notification settings - Fork 13
50 lines (44 loc) · 1.34 KB
/
ci-app-build-and-deploy-patch.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
48
49
50
name: Build and Deploy Patch Release
on:
push:
branches: [ 'master' ]
jobs:
build:
runs-on: ubuntu-latest
env:
app-dir: ./
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
- run: npm ci
working-directory: ${{ env.app-dir }}
- run: npm run build
working-directory: ${{ env.app-dir }}
- run: ls ./dist
working-directory: ${{ env.app-dir }}
# release
- run: git reset --hard
- run: ls ./dist
working-directory: ${{ env.app-dir }}
- run: npm version patch --git-tag-version false
- name: commit version bump
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -m "bump version to $(node -p -e "require('./package.json').version") [skip ci]" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.OUR_GITHUB_TOKEN }}
branch: ${{ github.ref }}
tags: true
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}