mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 15:02:58 +02:00
Add GitHub Actions workflow for automatic tagging
- 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
This commit is contained in:
53
.github/workflows/tagging.yaml
vendored
Normal file
53
.github/workflows/tagging.yaml
vendored
Normal file
@@ -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 "actions@github.com"
|
||||
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
|
Reference in New Issue
Block a user