-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (43 loc) · 1.15 KB
/
release-candidate.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
name: Publish-PyPI-Release
on:
push:
branches:
- release-candidate
jobs:
Unit-Lint-Release-Candidate:
environment: pypi
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
poetry-version: ["1.7.1"]
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry==${{ matrix.poetry-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"
- run: |
sudo swapoff -a
sudo rm -f /swapfile
sudo apt clean
make setup.install
pip install -U twine
make lints.ci
make test.unit
make setup.install
if [[ "v$(poetry version --short)" == *"rc"* ]];
then
poetry build
twine check --strict dist/*
else
exit 1
fi
- name: upload to pypi
run: twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}