Skip to content

Bump version to 0.1.1rc64 #281

Bump version to 0.1.1rc64

Bump version to 0.1.1rc64 #281

Workflow file for this run

name: Pre-release Version Bump
on:
pull_request:
types: [closed]
branches:
- main
jobs:
bump-version:
# Only run when PR is merged (not when closed without merging)
if: github.event.pull_request.merged == true && !startsWith(github.event.pull_request.head.ref, 'bump-version')
name: Update version and changelog
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 0 # Need full history for changelog
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "0.7.3"
- name: Install dependencies
shell: bash
run: |
uv sync --all-extras --all-groups
pip install semver packaging
- name: Get current version
id: current_version
run: |
CURRENT_VERSION=$(uvx --from=toml-cli toml get --toml-path=pyproject.toml project.version)
echo "CURRENT_VERSION=$CURRENT_VERSION" >> $GITHUB_ENV
- name: Update version
id: version_update
run: |
# Update the version
python .github/scripts/pre_release.py main ${{ env.CURRENT_VERSION }}
uv lock
# Get the new version
NEW_VERSION=$(uvx --from=toml-cli toml get --toml-path=pyproject.toml project.version)
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
- name: Update version.py
run: |
echo '"""' > application_sdk/version.py
echo 'Version information for the application_sdk package.' >> application_sdk/version.py
echo '"""' >> application_sdk/version.py
echo '' >> application_sdk/version.py
echo '__version__ = "${{ env.NEW_VERSION }}"' >> application_sdk/version.py
- name: Generate changelog
id: changelog
env:
GH_TOKEN: ${{ secrets.ORG_PAT_GITHUB }}
run: python .github/scripts/update_changelog.py "${{ env.CURRENT_VERSION }}" "${{ env.NEW_VERSION }}"
- name: Commit version bump and changelog
env:
GH_TOKEN: ${{ secrets.ORG_PAT_GITHUB }}
run: |
git config --global user.name 'atlan-ci'
git config --global user.email '[email protected]'
branch_name="bump-version-${{ github.ref_name }}"
git checkout -b $branch_name
git add pyproject.toml uv.lock CHANGELOG.md application_sdk/version.py
git commit -m "chore: bump version to ${{ env.NEW_VERSION }}"
git push origin $branch_name --force
gh pr create --base ${{ github.ref_name }} --title "Bump version to ${{ env.NEW_VERSION }}" --body "Automated version bump after merge to main.
This PR updates:
- pyproject.toml
- application_sdk/version.py
- CHANGELOG.md
Version: ${{ env.CURRENT_VERSION }} → ${{ env.NEW_VERSION }}" --label "release"
# gh pr merge --squash --admin