Skip to content

Commit 3c56e9a

Browse files
authored
chore: adding publish step to release-please (#581)
1 parent 1e333f8 commit 3c56e9a

File tree

2 files changed

+28
-87
lines changed

2 files changed

+28
-87
lines changed

.github/workflows/publish.yml

Lines changed: 0 additions & 85 deletions
This file was deleted.

.github/workflows/release-please.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,8 @@ jobs:
4848
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
4949
- name: Install dependencies
5050
run: poetry install
51-
5251
- name: Test
5352
run: poetry run pytest -rP .
54-
5553
release-please:
5654
runs-on: ubuntu-latest
5755
needs: test
@@ -62,3 +60,31 @@ jobs:
6260
config-file: .github/release-please-config.json
6361
manifest-file: .github/.release-please-manifest.json
6462
target-branch: ${{ github.ref_name }}
63+
publish:
64+
runs-on: ubuntu-latest
65+
needs: test
66+
strategy:
67+
matrix:
68+
python-version: ["3.8"]
69+
steps:
70+
- name: Checkout repo
71+
uses: actions/checkout@v4
72+
- name: Set up python
73+
uses: actions/setup-python@v6
74+
with:
75+
python-version: ${{ matrix.python-version }}
76+
- name: Bootstrap poetry
77+
run: |
78+
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
79+
- name: Install dependencies
80+
run: poetry install
81+
- name: Build package
82+
run: poetry build
83+
- name: Publish to TestPyPI
84+
env:
85+
POETRY_PYPI_TOKEN_TESTPYPI: ${{ secrets.TEST_PYPI_TOKEN }}
86+
run: poetry publish --repository testpypi
87+
- name: Publish to PyPI
88+
env:
89+
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
90+
run: poetry publish

0 commit comments

Comments
 (0)