-
Notifications
You must be signed in to change notification settings - Fork 6
68 lines (56 loc) · 2.22 KB
/
main.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: "Test build release"
on:
push:
branches:
- master
jobs:
release:
# uncomment next line as soon as visual tesing starts working
# needs: visual_test
name: Release tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Check for release commit
id: 'is_release_commit'
uses: /innovaccer/design-system/actions/check-release-commit@master
- uses: actions/setup-node@v1
if: steps.is_release_commit.outputs.result == 1
with:
node-version: '20.x'
- name: npm install
if: steps.is_release_commit.outputs.result == 1
run: npm install
- name: setup git
if: steps.is_release_commit.outputs.result == 1
run: git checkout -b preparing-module-for-npm-publish && git config --global user.email "release-bot@innovaccer.com" && git config --global user.name "release-bot"
- name: setup git
if: steps.is_release_commit.outputs.result == 1
run: git status
- name: bump module version
if: steps.is_release_commit.outputs.result == 1
run: npm version $(git log -1 --pretty=format:%s) -m "Released %s"
- name: push module tags to github
if: steps.is_release_commit.outputs.result == 1
run: git push https://${{ secrets.GH_TOKEN }}@github.com/$GITHUB_REPOSITORY.git HEAD:master --follow-tags
- name: generate .npmrc
if: steps.is_release_commit.outputs.result == 1
run: cp .npmrc.stub .npmrc
- name: Publish to npmjs
if: steps.is_release_commit.outputs.result == 1
run: npm publish --access public
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
- name: remove .npmrc
if: steps.is_release_commit.outputs.result == 1
run: rm -rf .npmrc
- name: deploy storybook
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
if: steps.is_release_commit.outputs.result == 1
run: npm run deploy-storybook -- --ci
- name: notify release
if: steps.is_release_commit.outputs.result == 1
uses: /innovaccer/mds-helpers/actions/notify-release@master
env:
GCHAT_PATH: ${{ secrets.GCHAT_PATH }}