Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8e35f02191 | ||
|
0f35839fb4
|
|||
|
|
a055276849 | ||
|
|
ce670c5539 | ||
|
7631ed6e7c
|
|||
|
cc5dc6141c
|
|||
|
|
a960641000 | ||
|
d8139a5193
|
|||
|
|
6ffc2f6a8f | ||
| 26e0da8f0b |
@@ -1,5 +1,5 @@
|
|||||||
[tool.bumpversion]
|
[tool.bumpversion]
|
||||||
current_version = "0.1.13"
|
current_version = "0.1.18"
|
||||||
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
|
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
|
||||||
serialize = ["{major}.{minor}.{patch}"]
|
serialize = ["{major}.{minor}.{patch}"]
|
||||||
search = "{current_version}"
|
search = "{current_version}"
|
||||||
|
|||||||
@@ -19,20 +19,56 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout the code
|
- name: Checkout the code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
- name: Install uv
|
||||||
|
uses: astral-sh/setup-uv@v5
|
||||||
|
- name: Set up Python
|
||||||
|
run: uv python install
|
||||||
|
with:
|
||||||
|
python-version-file: "pyproject.toml"
|
||||||
|
|
||||||
|
- name: Install the project
|
||||||
|
run: uv sync --locked --all-extras --dev
|
||||||
- name: Set Git identity
|
- name: Set Git identity
|
||||||
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
|
- name: Bump version
|
||||||
id: bump
|
id: bump
|
||||||
uses: callowayproject/bump-my-version@master
|
|
||||||
env:
|
|
||||||
BUMPVERSION_TAG: "true"
|
|
||||||
with:
|
|
||||||
args: ${{ inputs.bump-type }}
|
|
||||||
github-token: ${{ secrets.TOKEN }}
|
|
||||||
|
|
||||||
- name: Check
|
|
||||||
if: steps.bump.outputs.bumped == 'true'
|
|
||||||
run: |
|
run: |
|
||||||
echo "Version was bumped from ${{ steps.bump.outputs.previous-version }} to ${{ steps.bump.outputs.current-version }}!"
|
uv tool install bump-my-version
|
||||||
|
echo "OLD_VERSION<<EOF" >> $GITHUB_ENV
|
||||||
|
echo "$(uv tool run bump-my-version show current_version)" >> $GITHUB_ENV
|
||||||
|
echo "EOF" >> $GITHUB_ENV
|
||||||
|
uv tool run bump-my-version bump ${{ github.event.inputs.bump }}
|
||||||
|
# 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 old ${{ env.OLD_VERSION }} new ${{ env.VERSION }}
|
||||||
|
- name: Update CHANGELOG
|
||||||
|
id: changelog
|
||||||
|
uses: requarks/changelog-action@v1
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.TOKEN }}
|
||||||
|
fromTag: ${{ env.OLD_VERSION }}
|
||||||
|
toTag: ${{ env.VERSION }}
|
||||||
|
writeToFile: true
|
||||||
|
- name: Push changes
|
||||||
|
uses: ad-m/github-push-action@master
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
branch: ${{ github.ref }}
|
||||||
|
- name: Create release
|
||||||
|
id: create_release
|
||||||
|
if: ${{ github.event.inputs.github_release == 'true' }}
|
||||||
|
uses: softprops/action-gh-release@master
|
||||||
|
with:
|
||||||
|
tag_name: ${{ env.VERSION }}
|
||||||
|
release_name: Release ${{ env.VERSION }}
|
||||||
|
body: ${{ steps.changelog.outputs.changelog }}
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
make_latest: true
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.TOKEN }}
|
||||||
@@ -24,6 +24,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: "contains(github.event.head_commit.message, 'release') || github.event_name == 'workflow_dispatch'"
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -57,29 +58,26 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
branch: ${{ github.ref }}
|
branch: ${{ github.ref }}
|
||||||
|
|
||||||
|
- name: "Build Changelog"
|
||||||
|
id: build_changelog
|
||||||
|
uses: mikepenz/release-changelog-builder-action@v5.0.0
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Add release notes to environment
|
- name: Add release notes to environment
|
||||||
id: add_release_notes
|
id: add_release_notes
|
||||||
run: |
|
run: |
|
||||||
echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV
|
echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV
|
||||||
echo "${{ github.event.inputs.release_notes }}" >> $GITHUB_ENV
|
echo "${{ github.event.inputs.release_notes }}" >> $GITHUB_ENV
|
||||||
echo "EOF" >> $GITHUB_ENV
|
echo "EOF" >> $GITHUB_ENV
|
||||||
- name: Generate changelog
|
|
||||||
id: changelog
|
|
||||||
uses: metcalfc/changelog-generator@v4.6.2
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.TOKEN }}
|
|
||||||
- name: Get the changelog
|
- name: Get the changelog
|
||||||
run: |
|
run: |
|
||||||
cat << "EOF"
|
cat << "EOF"
|
||||||
${{ steps.changelog.outputs.changelog }}
|
${{ steps.changelog.outputs.changelog }}
|
||||||
EOF
|
EOF
|
||||||
echo ${{ steps.changelog.outputs.changelog }}
|
echo ${{ steps.changelog.outputs.changelog }}
|
||||||
- name: Create release notes
|
|
||||||
uses: johnyherangi/create-release-notes@main
|
|
||||||
id: create-release-notes
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
id: create_release
|
id: create_release
|
||||||
@@ -88,7 +86,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
tag_name: ${{ env.VERSION }}
|
tag_name: ${{ env.VERSION }}
|
||||||
release_name: Release ${{ env.VERSION }}
|
release_name: Release ${{ env.VERSION }}
|
||||||
body: ${{ steps.create-release-notes.outputs.release-notes }}
|
body: ${{steps.build_changelog.outputs.changelog}}
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
make_latest: true
|
make_latest: true
|
||||||
|
|||||||
Reference in New Issue
Block a user