Skip to content

Commit 11abe12

Browse files
jsa34aslakhellesoy
andauthored
Update release-python.yml (#111)
Co-authored-by: Aslak Hellesøy <[email protected]>
1 parent 80b573f commit 11abe12

File tree

1 file changed

+13
-22
lines changed

1 file changed

+13
-22
lines changed

.github/workflows/release-python.yml

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,29 +21,20 @@ jobs:
2121
python-version: "3.10"
2222

2323
- name: Install Poetry
24-
run: python install-poetry.py -y
25-
26-
- name: Update PATH
27-
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
28-
29-
- name: Build project for distribution
24+
uses: snok/install-poetry@v1
25+
with:
26+
version: 1.1.13
27+
28+
- name: Install dependencies
29+
run: poetry install
30+
31+
- name: Build
3032
run: poetry build
3133

32-
- name: Check Version
33-
id: check-version
34+
- name: Config for PyPI release
3435
run: |
35-
[[ "$(poetry version --short)" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] \
36-
|| echo ::set-output name=prerelease::true
36+
poetry config pypi-token.pypi "${{ secrets.PYPI_TOKEN }}"
3737
38-
- name: Create Release
39-
uses: ncipollo/release-action@v1
40-
with:
41-
artifacts: "dist/*"
42-
token: ${{ secrets.GITHUB_TOKEN }}
43-
draft: false
44-
prerelease: steps.check-version.outputs.prerelease == 'true'
45-
46-
- name: Publish to PyPI
47-
env:
48-
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
49-
run: poetry publish
38+
- name: Publish
39+
run: |
40+
poetry publish

0 commit comments

Comments
 (0)