Skip to content

Commit db17054

Browse files
authored
Update release.yml
1 parent 5a47d2f commit db17054

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ jobs:
2222
steps:
2323
- uses: actions/checkout@v4
2424
with:
25-
ref: '478-copulas-release-workflow-errors-with-failed-to-push-some-refs-to-httpsgithubcomsdv-devcopulas'
26-
# ref: ${{ inputs.candidate && 'main' || 'stable' }}
25+
ref: ${{ inputs.candidate && 'main' || 'stable' }}
2726

2827
- name: Set up latest Python
2928
uses: actions/setup-python@v5
@@ -42,18 +41,18 @@ jobs:
4241
- name: Publish a Python distribution to PyPI
4342
uses: pypa/gh-action-pypi-publish@release/v1
4443
with:
45-
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
46-
repository-url: 'https://test.pypi.org/legacy/'
44+
password: ${{ inputs.test_pypi && secrets.TEST_PYPI_API_TOKEN || secrets.PYPI_API_TOKEN }}
45+
repository-url: ${{ inputs.test_pypi && 'https://test.pypi.org/legacy/' || 'https://upload.pypi.org/legacy/' }}
4746

4847
- name: Bump version to next candidate
48+
if: ${{ inputs.candidate && !inputs.test_pypi }}
4949
run: |
5050
git config user.name "github-actions[bot]"
5151
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
52-
bump-my-version bump patch --no-tag --no-commit
53-
# make bumpversion-candidate
54-
# if: ${{ inputs.candidate && !inputs.test_pypi }}
52+
make bumpversion-candidate
5553
5654
- name: Create pull request
55+
if: ${{ inputs.candidate && !inputs.test_pypi }}
5756
id: cpr
5857
uses: peter-evans/create-pull-request@v4
5958
with:

0 commit comments

Comments
 (0)