Skip to content

Commit

Permalink
Add GitHub Actions workflow for automatic tagging
Browse files Browse the repository at this point in the history
- Set up Tagging Workflow to automate tagging on pushes to the `mpx` branch
- Adds tag generation and commits changes to `configure.ac` if updated

- Local creation of tags and their pushes is only necessary for larger feature updates
- Ensuring clear  tag visibility
  • Loading branch information
dbt1 committed Nov 10, 2024
1 parent 4af226e commit 7995026
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/tagging.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Tagging Workflow

on:
push:
branches:
- mpx
paths-ignore:
- '.github/**'

permissions:
contents: write

jobs:
tag:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0 # Ensures that all tags are downloaded

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install GitPython
curl -o tagit.py https://raw.githubusercontent.com/dbt1/tagit/master/tagit.py
chmod +x tagit.py
- name: Verify tagit.py download
run: |
if [ ! -f tagit.py ]; then
echo "tagit.py was not downloaded!"
exit 1
fi
- name: Tagging
run: |
python tagit.py -f configure.ac
- name: Commit and push changes
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
git add configure.ac
git commit -m "tagging: Automatically updated tags [skip ci]" || echo "No changes to commit"
git push
git push --tags

0 comments on commit 7995026

Please sign in to comment.