-
Notifications
You must be signed in to change notification settings - Fork 89
57 lines (44 loc) · 1.75 KB
/
manual.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
name: "Custom release"
on:
workflow_dispatch:
inputs:
release_type:
description: 'Release type to be used in npm version command'
required: true
default: 'prerelease'
jobs:
release:
name: Release tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '20.x'
- name: npm install
run: npm ci
- name: setup git
run: git checkout -b preparing-module-for-npm-publish && git config --global user.email "[email protected]" && git config --global user.name "release-bot"
- name: bump module version
run: RELEASE_COMMIT=true npm version --no-commit-hooks ${{ github.event.inputs.release_type }} -m "Released %s"
- name: gnerate .npmrc
run: cp .npmrc.stub .npmrc
- name: Publish to npmjs
run: npm publish --access public
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
- name: remove .npmrc
run: rm -rf .npmrc
- name: push module tags to github
run: git push https://${{ secrets.GH_TOKEN }}@github.com/$GITHUB_REPOSITORY.git v$(node -p -e "require('./package.json').version")
- name: remove css/dist dist/ from commit
run: |
git reset HEAD~1
git add package.json
git commit -m "Released v$(node -p -e "require('./package.json').version")" --no-verify
- name: push version to github
run: git push https://${{ secrets.GH_TOKEN }}@github.com/$GITHUB_REPOSITORY.git HEAD:$GITHUB_REF_NAME
- name: notify release
uses: /innovaccer/design-system/actions/notify-release@master
env:
GCHAT_PATH: ${{ secrets.GCHAT_PATH }}