Skip to content

Commit

Permalink
ci: Update python.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
danay1999 authored May 1, 2023
1 parent 088d4c0 commit 12f91e5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,18 @@ jobs:
default_bump: false

- name: Set Configurations
if: steps.tag_version.outputs.release_type
if: steps.tag_version.outputs.release_type && github.event_name != 'release'
shell: bash
env:
OLD_VERSION: ${{ steps.tag_version.outputs.previous_version }}
VERSION: ${{ steps.tag_version.outputs.new_version }}
run: sed -ri 's/(__version__ = ")([0-9]+\.[0-9]+\.[0-9]+?(.*))(")/\1'"$VERSION"'\3/' "src/gpt_review/__init__.py" || exit 1

- name: Set Configurations
if: steps.tag_version.outputs.release_type && github.event_name == 'release'
shell: bash
env:
VERSION: ${{ steps.tag_version.outputs.previous_version }}
run: sed -ri 's/(__version__ = ")([0-9]+\.[0-9]+\.[0-9]+?(.*))(")/\1'"$VERSION"'\3/' "src/gpt_review/__init__.py" || exit 1

- name: Publish Snapshot to TestPyPi
uses: microsoft/[email protected]
Expand Down

0 comments on commit 12f91e5

Please sign in to comment.