-
Notifications
You must be signed in to change notification settings - Fork 9
37 lines (37 loc) · 1.2 KB
/
to-release-patch-workflow.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
name: TO_RELEASE_PATCH
on: workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checks-out repository
uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '12.x'
registry-url: 'https://registry.npmjs.org'
- name: Install
run: |
npm install
- name: Init git identity
run: |
git config --global user.email "${{ secrets.MY_EMAIL }}"
git config --global user.name "${{ secrets.MY_NAME }}"
- name: Release patch
run: |
npm run release:patch
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Push new tag
run: |
git push --follow-tags https://${{ secrets.MY_LOGIN }}:${{ secrets.MY_GITHUB_TOKEN }}@github.com/olivierlsc/angular-page-visibility.git HEAD:${{ steps.extract_branch.outputs.branch }}
- name: Build lib
run: |
npm run build:lib
- name: Publish lib on NPM registry
run: |
npm run publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}