refactor: reorganize version bump steps in release workflow
This commit is contained in:
@@ -65,22 +65,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
git config user.name "Gitea CI"
|
git config user.name "Gitea CI"
|
||||||
git config user.email "ci@git.theprivateserver.de"
|
git config user.email "ci@git.theprivateserver.de"
|
||||||
- name: Bump version
|
|
||||||
id: bump
|
|
||||||
run: |
|
|
||||||
uv tool install bump-my-version
|
|
||||||
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 "VERSION<<EOF" >> $GITHUB_ENV
|
|
||||||
echo "$(uv tool run bump-my-version show current_version)" >> $GITHUB_ENV
|
|
||||||
echo "EOF" >> $GITHUB_ENV
|
|
||||||
- name: Check version
|
|
||||||
run: echo ${{ env.VERSION }}
|
|
||||||
- name: Push changes
|
|
||||||
uses: ad-m/github-push-action@master
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
branch: ${{ github.ref }}
|
|
||||||
|
|
||||||
- name: Create release notes
|
- name: Create release notes
|
||||||
run: |
|
run: |
|
||||||
@@ -103,6 +87,22 @@ jobs:
|
|||||||
--push .
|
--push .
|
||||||
|
|
||||||
|
|
||||||
|
- name: Bump version
|
||||||
|
id: bump
|
||||||
|
run: |
|
||||||
|
uv tool install bump-my-version
|
||||||
|
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 "VERSION<<EOF" >> $GITHUB_ENV
|
||||||
|
echo "$(uv tool run bump-my-version show current_version)" >> $GITHUB_ENV
|
||||||
|
echo "EOF" >> $GITHUB_ENV
|
||||||
|
- name: Check version
|
||||||
|
run: echo ${{ env.VERSION }}
|
||||||
|
- name: Push changes
|
||||||
|
uses: ad-m/github-push-action@master
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
branch: ${{ github.ref }}
|
||||||
- name: Create release
|
- name: Create release
|
||||||
id: create_release
|
id: create_release
|
||||||
if: ${{ github.event.inputs.github_release == 'true' }}
|
if: ${{ github.event.inputs.github_release == 'true' }}
|
||||||
|
|||||||
Reference in New Issue
Block a user