update publish workflow
This commit is contained in:
39
.github/workflows/python-publish.yml
vendored
39
.github/workflows/python-publish.yml
vendored
@@ -1,29 +1,22 @@
|
|||||||
name: Upload Python Package
|
name: PyPI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
push:
|
||||||
types: [published]
|
tags:
|
||||||
|
- "v*.*.*"
|
||||||
permissions:
|
paths-ignore:
|
||||||
contents: read
|
- '**.md'
|
||||||
|
- 'docs/**'
|
||||||
|
- 'docsrc/**'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
- name: Set up Python
|
- name: Publish GH release
|
||||||
uses: actions/setup-python@v3
|
uses: softprops/action-gh-release@v0.1.14
|
||||||
with:
|
- name: Build using poetry and publish to PyPi
|
||||||
python-version: '3.9'
|
uses: JRubics/poetry-publish@v1.11
|
||||||
- name: Install Poetry
|
with:
|
||||||
run: curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
|
pypi_token: ${{ secrets.PYPI_API_TOKEN }}
|
||||||
- name: Add Poetry to path
|
|
||||||
run: echo "${HOME}/.poetry/bin" >> $GITHUB_PATH
|
|
||||||
- name: Install venv
|
|
||||||
run: poetry install
|
|
||||||
- run: poetry config pypi-token.pypi "${{ secrets.PYPI_API_KEY }}"
|
|
||||||
- name: Publish package
|
|
||||||
run: poetry publish --build
|
|
||||||
Reference in New Issue
Block a user