Automatic workflow to update main after a release (#891)

This commit is contained in:
Hendrik Eeckhaut
2025-05-27 09:06:38 +02:00
committed by GitHub
parent c9aaf2e0fa
commit 82767ca2d5

24
.github/workflows/updatemain.yml vendored Normal file
View File

@@ -0,0 +1,24 @@
name: Fast-forward main branch to published release tag
on:
release:
types: [published]
jobs:
ff-main-to-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout main
uses: actions/checkout@v4
with:
ref: main
- name: Fast-forward main to release tag
run: |
tag="${{ github.event.release.tag_name }}"
git fetch origin "refs/tags/$tag:refs/tags/$tag"
git merge --ff-only "refs/tags/$tag"
git push origin main