Skip to content

Commit

Permalink
add Build and publish to release step
Browse files Browse the repository at this point in the history
  • Loading branch information
garegincontractor authored and garegincontractor committed Sep 22, 2023
1 parent 422b9e9 commit 263f252
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/python-bump2version-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,24 @@ jobs:
bump2version release --serialize {major}.{minor}.{patch} --verbose --allow-dirty
echo RELEASE_VERSION=$(python setup.py --version) >> $GITHUB_OUTPUT
- name: Build and publish
- name: Build and publish to dev
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
if: "${{ github.event_name == 'pull_request' || (github.event_name == 'push' && github.event.repository.default_branch == github.ref_name) }}"
run: |
python -m build
twine upload --repository-url https://nexus.pepstaging.com/repository/pypi-dev/ dist/*
- name: Build and publish to release
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
if: "${{ startsWith(github.ref, 'refs/tags/') }}"
run: |
python -m build
twine upload --repository-url https://nexus.pepstaging.com/repository/pypi-release/ dist/*
- name: Update develop version
id: dev_version
if: "${{ github.event_name == 'push' && github.event.repository.default_branch == github.ref_name }}"
Expand Down

0 comments on commit 263f252

Please sign in to comment.