Skip to content

Commit 932dd84

Browse files
committed
👷 Update GA for pypi publish
1 parent df614d3 commit 932dd84

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

.github/workflows/main.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,21 @@ on:
88
jobs:
99
test-and-publish-flow:
1010
runs-on: ubuntu-latest
11+
permissions:
12+
id-token: write
1113
steps:
1214
- name: Check out repository
13-
uses: actions/checkout@v2
15+
uses: actions/checkout@v4
1416

1517
- name: Set up python
16-
uses: actions/setup-python@v2
18+
uses: actions/setup-python@v4
1719
with:
18-
python-version: 3.9
20+
python-version: 3.11
1921

2022
- name: Run Poetry image
2123
uses: abatilo/[email protected]
2224
with:
23-
poetry-version: 1.3.1
25+
poetry-version: 1.7.1
2426

2527
- name: Install library
2628
run: poetry install --no-interaction
@@ -43,8 +45,9 @@ jobs:
4345
- 'pyproject.toml'
4446
4547
- if: ${{ (github.ref == 'refs/heads/master') && (steps.changes.outputs.root == 'true')}}
46-
name: Build and publish
47-
env:
48-
PYPI_USER: ${{ secrets.PYPI_USER }}
49-
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
50-
run: poetry publish --username $PYPI_USER --password $PYPI_PASSWORD --build
48+
name: Build
49+
run: poetry build
50+
51+
- if: ${{ (github.ref == 'refs/heads/master') && (steps.changes.outputs.root == 'true')}}
52+
name: Publish release distributions to PyPI
53+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)