-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add: pre-release workflow for publishing package to test.pypi when a …
…tag has been pushed to the remote repo
- Loading branch information
1 parent
229513c
commit b76d436
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Publish to Test PyPI | ||
on: | ||
push: | ||
# when a new tag has been pushed to repo | ||
tags: | ||
- '*.*.*' | ||
|
||
jobs: | ||
package_pre_release: | ||
name: Publish Package to Test PyPI | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.11] | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python 3.11 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install Pipx & Poetry | ||
run: | | ||
python3 -m pip install --user pipx | ||
python3 -m pipx ensurepath | ||
pipx install poetry | ||
- name: Configure Test.PYPI as source to publish to | ||
run: | | ||
poetry config repositories.testpypi https://test.pypi.org/legacy/ | ||
poetry config pypi-token.testpypi ${{ secrets.TEST_PYPI_PASSWORD }} | ||
- name: Publish package | ||
run: poetry publish --build -r testpypi |