-
Notifications
You must be signed in to change notification settings - Fork 26
47 lines (41 loc) · 1.49 KB
/
release.yaml
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
---
name: Trigger release and bump version
on: # yamllint disable-line rule:truthy
pull_request:
types:
- closed
jobs:
trigger-release-process:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3
with:
token: ${{ secrets.BOT_ACCESS_TOKEN }}
- name: Check head commit message
id: check_head_commit_message
continue-on-error: true
run: |
head_commit_message=`git log --format=%s -1`
python ./.github/scripts/validate_release_commit.py "$head_commit_message"
if [ $? -eq 1 ]
then
echo "valid_release_message=False" >> $GITHUB_OUTPUT
else
echo "valid_release_message=True" >> $GITHUB_OUTPUT
fi
- name: Install commitizen
if: ${{ steps.check_head_commit_message.outputs.valid_release_message == 'True' }}
run: |
pip3 install commitizen
- name: Setup Github Actions git user
if: ${{ steps.check_head_commit_message.outputs.valid_release_message == 'True' }}
run: |
git config --global user.email "[email protected]"
git config --global user.name "airflow-oss-bot"
- name: Tag and push tag for triggering release
if: ${{ steps.check_head_commit_message.outputs.valid_release_message == 'True' }}
run: |
git tag `cz version -p`
git push origin `cz version -p`