From b8e6deaafd30afa664d50ca1bcddc05512730bda Mon Sep 17 00:00:00 2001 From: Antynea Date: Sun, 10 May 2026 12:07:00 +0200 Subject: [PATCH] Add workflow to bump version on tag push --- .github/workflows/bump-version.yml | 33 ++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/bump-version.yml diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml new file mode 100644 index 0000000..dfc0c10 --- /dev/null +++ b/.github/workflows/bump-version.yml @@ -0,0 +1,33 @@ +name: Bump version on tag + +on: + push: + tags: + - '*' + +permissions: + contents: write + +jobs: + bump-version: + name: Bump version in config + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + ref: master + fetch-tags: true + + - name: Update version in config + run: | + version="$(git describe --tags --abbrev=0)" + sed -i "s/GRUB_BTRFS_VERSION=.*/GRUB_BTRFS_VERSION=${version}/" config + + - name: Commit updated config + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add config + git commit -m "chore: bump version to ${version}" + git push origin master