-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (56 loc) · 1.65 KB
/
release.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
name: Release
on:
workflow_dispatch:
push:
branches: [main]
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.BOT_ACCESS_TOKEN }}
- name: git config user
run: |
git config --global user.name mrm-dev
git config --global user.email [email protected]
- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: "18"
- name: Install dependencies
run: |
corepack enable
pnpm install
- name: Release
run: |
pnpm release
git push --follow-tags origin main
pnpm build
- name: Publish
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
package: "./package.json"
- name: Set env for last tag release
run: echo "LAST_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
- name: Post to a Slack channel
id: slack
uses: slackapi/[email protected]
with:
channel-id: "C03BJMKFZHV"
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":robot_face: New Inversify Generator release :robot_face:\n*<https://github.com/mrmilu/inversify_generator/blob/master/CHANGELOG.md|${{ env.LAST_TAG }}>*"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}