Skip to content

Commit

Permalink
add: pre-release workflow for publishing package to test.pypi when a …
Browse files Browse the repository at this point in the history
…tag has been pushed to the remote repo
  • Loading branch information
Audiosutras committed Nov 16, 2023
1 parent 229513c commit b76d436
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/pre-release.yml
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

0 comments on commit b76d436

Please sign in to comment.