Merge pull request 'fix: allow dirty state for version bump and update release notes handling' (#19) from dev into main

Reviewed-on: #19
This commit was merged in pull request #19.
This commit is contained in:
2025-05-23 16:55:06 +01:00

View File

@@ -69,7 +69,7 @@ jobs:
id: bump id: bump
run: | run: |
uv tool install bump-my-version uv tool install bump-my-version
uv tool run bump-my-version bump ${{ github.event.inputs.bump }} uv tool run bump-my-version bump ${{ github.event.inputs.bump }} --allow-dirty
# echo the version to github env, the version is shown by using uv tool run bump-my-version show current_version # echo the version to github env, the version is shown by using uv tool run bump-my-version show current_version
echo "VERSION<<EOF" >> $GITHUB_ENV echo "VERSION<<EOF" >> $GITHUB_ENV
echo "$(uv tool run bump-my-version show current_version)" >> $GITHUB_ENV echo "$(uv tool run bump-my-version show current_version)" >> $GITHUB_ENV
@@ -82,12 +82,13 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }} branch: ${{ github.ref }}
- name: Add release notes to environment - name: Create release notes
id: add_release_notes
run: | run: |
echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV mkdir release_notes
echo "${{ github.event.inputs.release_notes }}" >> $GITHUB_ENV echo -e "${{ inputs.release_notes }}" >> release_notes/release_notes.md
echo "EOF" >> $GITHUB_ENV echo "Release notes:"
cat release_notes/release_notes.md
echo ""
- name: Build and store Docker image - name: Build and store Docker image
if: ${{ github.event.inputs.docker_release == 'true' }} if: ${{ github.event.inputs.docker_release == 'true' }}
@@ -100,16 +101,7 @@ jobs:
--tag ${{ secrets.REGISTRY }}/${REPO_NAME}:latest \ --tag ${{ secrets.REGISTRY }}/${REPO_NAME}:latest \
--tag ${{ secrets.REGISTRY }}/${REPO_NAME}:${TAG} \ --tag ${{ secrets.REGISTRY }}/${REPO_NAME}:${TAG} \
--push . --push .
- name: Generate changelog
id: changelog
uses: metcalfc/changelog-generator@v4.6.2
with:
token: ${{ secrets.TOKEN }}
- name: Get the changelog
run: |
cat << "EOF"
${{ steps.changelog.outputs.changelog }}
EOF
- name: Create release - name: Create release
id: create_release id: create_release
@@ -118,7 +110,7 @@ jobs:
with: with:
tag_name: ${{ env.VERSION }} tag_name: ${{ env.VERSION }}
release_name: Release ${{ env.VERSION }} release_name: Release ${{ env.VERSION }}
body: ${{ steps.changelog.outputs.changelog }} body_path: release_notes/release_notes.md
draft: false draft: false
prerelease: false prerelease: false
make_latest: true make_latest: true