From 05a82283b61c1ee3abbb0d1ed33354e529c5f01d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakob=20M=C3=B6ller?= Date: Mon, 18 Nov 2024 17:45:08 +0100 Subject: [PATCH] chore: also create a branch based on the tag to avoid dangling commits (#1098) #### What this PR does / why we need it currently our tagged releases do not have branch accomodating them, leading to dangling commits. (see https://github.com/open-component-model/ocm/tree/v0.18.0-rc.1 for an example) This fixes this by also creating an appropriate release branch. This might introduce issues with things like the release drafter though, so this is likely only the first line of commits for this. #### Which issue(s) this PR fixes fix #1099 --- .github/workflows/release-drafter.yaml | 5 ++++- .github/workflows/release.yaml | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-drafter.yaml b/.github/workflows/release-drafter.yaml index 1901afcea0..607cf7613b 100644 --- a/.github/workflows/release-drafter.yaml +++ b/.github/workflows/release-drafter.yaml @@ -3,7 +3,10 @@ name: Release Drafter on: push: branches: - - releases/* + # we only want to draft release notes for the base version, + # e.g. for releases/v0.18, we draft v0.18.0 for all RCs + # this means that we explicitly don't want to draft release notes for releases/v0.18.0 or releases/v0.18.1 + - 'releases/v[0-9]+.[0-9]+' permissions: contents: read diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5abef69138..507ac7cbcb 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -160,7 +160,8 @@ jobs: git commit -m "Release $RELEASE_VERSION" msg="Release ${{ env.RELEASE_VERSION }}" git tag --annotate --message "${msg}" ${{ env.RELEASE_VERSION }} - git push origin ${{ env.RELEASE_VERSION }} + # push both the tag as well as a release branch with that tag. + git push origin releases/${{ env.RELEASE_VERSION }} ${{ env.RELEASE_VERSION }} - name: Create GPG Token file from Secret run: |