forked from neutrino-mp/libstb-hal
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |