Skip to content

Commit

Permalink
chore: also create a branch based on the tag to avoid dangling commits (
Browse files Browse the repository at this point in the history
#1098)

<!-- markdownlint-disable MD041 -->
#### 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
<!--
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
fix #1099
  • Loading branch information
jakobmoellerdev authored Nov 18, 2024
1 parent 8b6bd17 commit 05a8228
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/release-drafter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down

0 comments on commit 05a8228

Please sign in to comment.