Skip to content

Commit

Permalink
update script
Browse files Browse the repository at this point in the history
  • Loading branch information
roumail committed Aug 2, 2024
1 parent f282bae commit 92900cb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
11 changes: 3 additions & 8 deletions .github/workflows/release-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,17 @@ jobs:
echo "bump_type=minor" >> $GITHUB_ENV
fi
- name: Get package version and changelog body
- name: Launch bump version script
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
poetry run python bump_version.py ${{ env.bump_type }}
PACKAGE_VERSION=$(poetry version -s)
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_ENV
- name: Build Package
run: poetry build

- name: Tag Release
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git tag -a v${{ env.PACKAGE_VERSION }} -m "Release v${{ env.PACKAGE_VERSION }}"
git push origin v${{ env.PACKAGE_VERSION }}
- name: Create Release
uses: ncipollo/release-action@v1
with:
Expand Down
5 changes: 4 additions & 1 deletion bump_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ def main():
subprocess.run(
["git", "commit", "-am", f"Bump version to {new_version}"], check=True
)
subprocess.run(["git", "tag", f"v{new_version}"], check=True)
subprocess.run(
["git", "tag", f"v{new_version}", "-m", f"Release v{new_version}"], check=True
)
subprocess.run(["git", "push", "origin", f"v{new_version}"], check=True)


if __name__ == "__main__":
Expand Down

0 comments on commit 92900cb

Please sign in to comment.