Skip to content

Commit

Permalink
feat: create release branch from k release
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorwhitney committed Nov 22, 2023
1 parent 44d573d commit 07f2b06
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ jobs:
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: bump minor for k releases
if: ${{ startsWith(steps.extract_branch.outputs.branch, 'k') }}
run: |
mv release-please-config.json release-please-config.orig.json
jq '.versioning = "always-bump-minor"' release-please-config.orig.json > release-please-config.json
- uses: google-github-actions/release-please-action@v3
id: release
with:
Expand All @@ -46,4 +41,15 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ steps.release.outputs.tag_name }} ./dist/build.txt
- name: create release branch from k release
if: ${{ startsWith(steps.extract_branch.outputs.branch, 'k') && steps.release.outputs.release_created }}
run: |
branch=release-${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.x
git checkout -b $branch
mv release-please-config.json tmp.json
jq '.versioning = "always-bump-patch"' tmp.json > release-please-config.json
rm tmp.json
git add release-please-config.json
git commit -m 'chore: release branch config bumps patch'
git push -u origin
# TODO: announce in #loki-releases if release created
2 changes: 1 addition & 1 deletion release-please-config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"bootstrap-sha": "b100d6fe25669928cb023e4b869af0cfe353b7b1",
"versioning": "always-bump-patch",
"versioning": "always-bump-minor",
"release-type": "simple",
"bump-minor-pre-major": false,
"bump-patch-for-minor-pre-major": false,
Expand Down

0 comments on commit 07f2b06

Please sign in to comment.