-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (36 loc) · 1.21 KB
/
path_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
48
49
50
51
name: Patch Release
on:
workflow_dispatch:
permissions:
contents: write
jobs:
run:
runs-on: ubuntu-latest
if: contains('["onuratakan", "github-actions[bot]"]', github.actor)
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set Up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: setup git config
run: |
# setup the username and email. I tend to use 'GitHub Actions Bot' with no email by default
git config user.name "GitHub Actions Bot"
git config user.email "<>"
- name: Run Version Bump Script
run: python bump.py patch
check_for_patch:
needs: run
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Check commit message
run: |
echo "Commit message ends with [PATCH]"
curl -X POST https://api.github.com/repos/${GITHUB_REPOSITORY}/actions/workflows/build.yaml/dispatches \
-H 'Accept: application/vnd.github.v3+json' \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-d '{"ref": "master"}'