Skip to content

Commit

Permalink
chore: only allow releasing from release branches
Browse files Browse the repository at this point in the history
This changes the release so that only release branches in the form of release/v0.y are accepted.

It changes the release Branch creation into a "Release Branch Cutoff". This leads to us only having one point in which the version file is bumped for y-streams (0.17,0.18. etc.).

During the release this file is touched up only to remove the -dev suffix after which the tag is pushed.

For z-streams (0.17.z) a new commit with a bump is still needed this is not included yet.
  • Loading branch information
jakobmoellerdev committed Nov 6, 2024
1 parent 4ba4e24 commit 1d34aff
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:
repository-projects: read
outputs:
base-version: ${{ steps.set-base-version.outputs.BASE_VERSION }}
release-version: ${{ steps.set-version.outputs.RELEASE_VERSION }}
release-version-no-prefix: ${{ steps.set-version.outputs.RELEASE_VERSION_NO_PREFIX }}
release-version: ${{ steps.export-version.outputs.RELEASE_VERSION }}
release-version-no-prefix: ${{ steps.export-version.outputs.RELEASE_VERSION_NO_PREFIX }}
release-notes: ${{ steps.release-notes.outputs.body }}
steps:
- name: Checkout
Expand All @@ -45,17 +45,16 @@ jobs:
run: |
RELEASE_VERSION=v$(go run $GITHUB_WORKSPACE/api/version/generate --no-dev print-rc-version ${{ github.event.inputs.release_candidate_name }})
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_OUTPUT
- name: Set Version
id: set-version
if: inputs.release_candidate == false
run: |
RELEASE_VERSION=${{env.BASE_VERSION}}
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_OUTPUT
- name: Export Version Without Prefix
id: export-version
run: |
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_OUTPUT
echo "RELEASE_VERSION_NO_PREFIX=${RELEASE_VERSION#v}" >> $GITHUB_OUTPUT
- name: Check Tag
Expand Down

0 comments on commit 1d34aff

Please sign in to comment.