Skip to content

Patch Release

Patch Release #22

Workflow file for this run

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
- name: Check commit message
run: |
commit_msg=$(git log --format=oneline -n 1 $GITHUB_SHA)
if [[ $commit_msg == *"[PATCH]" ]]; then
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"}'
else
echo "Commit message does not end with [PATCH]"
fi