-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (42 loc) · 1.54 KB
/
new-patch-release.yaml
File metadata and controls
52 lines (42 loc) · 1.54 KB
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
51
52
# This is a basic workflow to help you get started with Actions
name: new patch release
on:
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0
- name: Node 14.x
uses: actions/setup-node@v2
with:
node-version: 14.x
- uses: bahmutov/npm-install@v1
- name: Patch Version and Deploy
run: npm run version:patch:build
- name: Publish
run: |
echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > ~/.npmrc
npm run lib:publish
rm ~/.npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Commit files
run: |
newVersion=$(npm --silent run lib:version)
git config --local user.email "release-bot@users.noreply.github.com"
git config --local user.name "github-actions-release-bot"
git add projects/angular-lingua/package.json
git commit -m ":bookmark: Creating Patch release: v${newVersion}"
git tag "v${newVersion}"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
tags: true