-
Notifications
You must be signed in to change notification settings - Fork 728
37 lines (35 loc) · 1.31 KB
/
releaser-bot.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: PR comment
on:
issue_comment:
types: [created, edited]
env:
BUMP_RELEASE_CONFIG_PATH: "./.bump-release.json"
GITHUB_REPOSITORY: "alura/techguide"
GITHUB_PR_NUMBER: ${{ github.event.issue.number }}
GITHUB_TOKEN: ${{ secrets.GH_GLOBAL_TOKEN }}
COMMIT_USERNAME: "CI Bot - DevSoutinho"
COMMIT_EMAIL: "[email protected]"
jobs:
comment_checker:
if: contains(github.event.comment.html_url, '/pull/') && github.event.comment.user.login == 'omariosouto'
runs-on: ubuntu-latest
steps:
## [Setup_CI]
# ======================
- name: Checkout
uses: actions/checkout@v3
- name: "[Checkout to Pull Request]"
run: hub pr checkout ${{ github.event.issue.number }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-node@v3
with:
node-version: 'v20.14.0'
# ======================
- name: "[RELEASE Script]"
if: contains(github.event.comment.body, '/release/') # support|major|minor|patch
run: |
cat .git/HEAD
git config --global user.name "${{ env.COMMIT_USERNAME }}"
git config --global user.email ${{ env.COMMIT_EMAIL }}
npx @displaykit/bump-release ${{ github.event.comment.body }}