-
Notifications
You must be signed in to change notification settings - Fork 8
54 lines (52 loc) · 1.49 KB
/
release.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
45
46
47
48
49
50
51
52
53
54
name: Release
on:
release:
types:
- published
jobs:
release:
name: Deploy release to PyPI
runs-on: ubuntu-latest
environment:
# name: testpypi
name: release
strategy:
matrix:
python-version: ["3.9"]
poetry-version: ["1.2.1"]
steps:
# ======
# Checkout, set up python
# ======
- name: Checkout source
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
# ======
# Install poetry
# ======
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: ${{ matrix.poetry-version }}
virtualenvs-create: true
virtualenvs-in-project: true
# ======
# Install dependencies
# ======
- name: Install dependencies
run: poetry install --no-interaction --no-root
# ======
# Build and upload package to Test-PyPI
# Null API token? "There is no pypi-token.testpypi setting."
# Test?
# poetry config repositories.testpypi https://test.pypi.org/legacy/
# poetry config pypi-token.testpypi ${{ secrets.TEST_PYPI_TOKEN }}
# poetry publish --no-interaction --build -r testpypi
# =====
- name: Upload package
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry publish --no-interaction --build