From 8f35f45e31b2461005518a0977a24ef1e3618b70 Mon Sep 17 00:00:00 2001 From: pat-s Date: Fri, 16 May 2025 13:11:07 +0000 Subject: [PATCH] chore: execute releases via `git-sv` (#865) Following the creation of the changelog via `git-sv`, the release process can also be simplified. The new approach only requires to call `git sv tag` from a Maintainer with write access to the repo. This will create and push the tag. The release notes and subsequent Gitea release will then be created by the new workflow job. Reviewed-on: https://gitea.com/gitea/helm-gitea/pulls/865 Co-authored-by: pat-s Co-committed-by: pat-s --- .gitea/workflows/release-version.yml | 22 ++++++++++++++++++++++ CONTRIBUTING.md | 4 ++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/release-version.yml b/.gitea/workflows/release-version.yml index 7c15ab9..18a239c 100644 --- a/.gitea/workflows/release-version.yml +++ b/.gitea/workflows/release-version.yml @@ -68,3 +68,25 @@ jobs: - name: Copy files to S3 and clear cache run: | aws s3 sync gitea/ s3://${{ secrets.AWS_S3_BUCKET}}/charts/ + + release-gitea: + needs: generate-chart-publish + runs-on: ubuntu-latest + container: docker.io/thegeeklab/git-sv:2.0.1 + steps: + - uses: actions/checkout@v4 + with: + fetch-tags: true + + - name: Create changelog + run: | + git sv current-version + git sv release-notes -t ${GITHUB_REF#refs/tags/} -o CHANGELOG.md + sed -i '1,2d' CHANGELOG.md # remove version + cat CHANGELOG.md + + - name: Release + uses: https://github.com/akkuman/gitea-release-action@v1 + with: + body_path: CHANGELOG.md + token: "${{secrets.ISSUE_RW_TOKEN}}" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e9ebc72..e514c12 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -75,6 +75,6 @@ See [bats documentation](https://bats-core.readthedocs.io/en/stable/) for usage ## Release process -1. Create a tag following the tagging schema -1. Push the tag +1. Ensure you have [`git-sv`](https://github.com/thegeeklab/git-sv) installed +1. Run `git sv tag` (this creates and pushes the tag following the respective next tag according to the semver commits issued since the last release) 1. Let CI do it's work