Skip to content

Commit 2b964d7

Browse files
committed
fix: manual poetry action
1 parent 1af4c47 commit 2b964d7

File tree

1 file changed

+28
-23
lines changed

1 file changed

+28
-23
lines changed

.github/workflows/publish-to-pypi.yml

+28-23
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,38 @@ name: Publish Python Package
22

33
on: push
44
jobs:
5-
# build:
6-
# name: Build distribution 📦
7-
# runs-on: ubuntu-latest
8-
9-
# steps:
10-
# - uses: actions/checkout@v4
11-
# - name: Set up Python
12-
# uses: actions/setup-python@v4
13-
# with:
14-
# python-version: "3.9"
15-
16-
publish-to-pypi:
17-
name: >-
18-
Publish Python 🐍 distribution 📦 to PyPI
5+
build:
6+
name: Build distribution 📦
197
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
20-
# needs:
21-
# - build
228
runs-on: ubuntu-latest
23-
environment:
24-
name: pypi
25-
url: https://pypi.org/p/derive_action_signing # Replace <package-name> with your PyPI project name
269
permissions:
2710
contents: write # IMPORTANT: mandatory for trusted publishing
2811

2912
steps:
30-
- name: Publish PyPi package
31-
uses: code-specialist/pypi-poetry-publish@v1
13+
- uses: actions/checkout@v4
14+
- name: Set up Python
15+
uses: actions/setup-python@v4
3216
with:
33-
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34-
PUBLISH_REGISTRY_PASSWORD: ${{ secrets.PYPI_TOKEN }}
17+
python-version: "3.9"
18+
19+
- name: Install Poetry
20+
run: |
21+
curl -sSL https://install.python-poetry.org | python3 -
22+
echo "$HOME/.local/bin" >> $GITHUB_PATH
23+
24+
- name: Configure Poetry
25+
run: |
26+
poetry config pypi-token.pypi $PYPI_TOKEN
27+
env:
28+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
29+
30+
- name: Install project dependencies
31+
run: poetry install
32+
33+
- name: Publish to PyPI
34+
run: poetry build
35+
env:
36+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
37+
38+
- name: Publish to PyPI
39+
run: poetry publish

0 commit comments

Comments
 (0)