Skip to content

Commit

Permalink
checking a version bump PR
Browse files Browse the repository at this point in the history
  • Loading branch information
K20shores committed Aug 9, 2024
1 parent 2591183 commit e6fb8bf
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
determine_version:
name: Determine Next Dev Version
runs-on: ubuntu-latest
if: github.event_name != 'release'
steps:
- uses: actions/checkout@v4

Expand All @@ -23,11 +24,34 @@ jobs:
dev_number=$(echo $current_version | grep -oP '\.dev\K[0-9]+')
next_dev_version="$base_version.dev$((dev_number+1))"
else
next_dev_version="$current_version.dev1"
next_dev_version="$current_version.dev0"
fi
echo "Next dev version: $next_dev_version"
echo "next_dev_version=$next_dev_version" >> $GITHUB_ENV
- name: Create new branch
run: |
branch_name="version-bump-${{ env.next_dev_version }}"
git checkout -b $branch_name
- name: Update version in __init__.py
run: |
sed -i "s/__version__ = .*/__version__ = \"$next_dev_version\"/" src/acom_music_box/__init__.py
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git add src/acom_music_box/__init__.py
git commit -m "Bump version to ${{ env.next_dev_version }}"
git push origin HEAD:$branch_name
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: $branch_name
title: "Version Bump to ${{ env.next_dev_version }}"
body: "Automatically bumped version to ${{ env.next_dev_version }}."
base: main

# build_sdist:
# name: Build
# runs-on: ubuntu-latest
Expand Down

0 comments on commit e6fb8bf

Please sign in to comment.