-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1.09 KB
/
pypi_publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: PyPI Publish
on:
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Install dependencies
run: |
poetry install --no-root
- name: Build and publish
env:
POETRY_PYPI_TOKEN: ${{ secrets.POETRY_PYPI_TOKEN }}
run: |
poetry version patch
poetry build
poetry publish --username __token__ --password $POETRY_PYPI_TOKEN
- name: Commit version change
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
git add pyproject.toml
git commit -m "Bump version to $(poetry version --short)"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}