-
-
Notifications
You must be signed in to change notification settings - Fork 3
36 lines (28 loc) · 900 Bytes
/
publish.yml
File metadata and controls
36 lines (28 loc) · 900 Bytes
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
name: publish
on:
release:
types: [created]
env:
POETRY_VIRTUALENVS_IN_PROJECT: "true"
POETRY_VERSION: "1.3.1"
MAIN_PYTHON_VERSION: "3.11"
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python -
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
- name: Install dependencies
run: make install-no-dev
- name: Build and publish
run: |
export TAG_NAME=`echo ${{ github.ref }} | cut -d / -f 3`
sed -i "s|^\(version = \"\).*\(\" # VERSION_ANCHOR\)$|\1$TAG_NAME\2|" pyproject.toml
poetry publish --build -u __token__ -p ${{ secrets.PYPI_PASSWORD }}