Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .github/workflows/bumpversion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Bump version and changelog
on:
workflow_dispatch

jobs:
bumpversion:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v6
- name: Get next version
id: tag_version
uses: python-semantic-release/python-semantic-release@v10.5.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
push: false
- name: Set up Python 3.12
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Create bumpversion
if: steps.tag_version.outputs.version
id: bumpversion
run: |
pip install bump2version
bump2version --new-version ${{ steps.tag_version.outputs.version }} setup.cfg
- name: Update Changelog
if: steps.tag_version.outputs.version
uses: stefanzweifel/changelog-updater-action@v1.12.0
with:
latest-version: ${{ steps.tag_version.outputs.tag }}
release-notes: ${{ steps.tag_version.outputs.release_notes }}
- name: Push branch
if: steps.tag_version.outputs.version
run: |
branch_name="bot/${{ steps.tag_version.outputs.tag }}"
git fetch --prune origin
if git show-ref --quiet refs/remotes/origin/$branch_name; then
git push --delete origin $branch_name
fi
git checkout -b $branch_name || git checkout $branch_name
git push origin $branch_name
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.AI_EXNTENSIONS_GITHUB_TOKEN }}
title: "chore: preparing release ${{ steps.tag_version.outputs.version }}"
commit-message: "chore: preparing release ${{ steps.tag_version.outputs.version }}"
branch: "bot/${{ steps.tag_version.outputs.tag }}"
base: main
body: |
Automated version bump for release ${{ steps.tag_version.outputs.version }}.

This pull request was automatically generated. It includes the following changes:

- Version: ${{ steps.tag_version.outputs.tag }}
- Previous version: v${{ steps.tag_version.outputs.previous_version }}

${{ steps.tag_version.outputs.changelog }}

No code changes are included in this pull request. The purpose of this PR is to trigger a version bump for the project.

Once the pull request is merged, a new GitHub release will be created with the updated version.
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release
on:
pull_request:
types:
- closed
branches:
- main

jobs:
release:
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'bot/v')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v6
- name: Create tag
id: tag_version
uses: python-semantic-release/python-semantic-release@v10.5.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
push: false
- name: Create a GitHub release
if: steps.tag_version.outputs.tag
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.tag }}
name: Release ${{ steps.tag_version.outputs.tag }}
body: ${{ steps.tag_version.outputs.release_notes }}
Loading
Loading