-
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (51 loc) · 1.63 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
55
56
57
58
59
60
61
62
63
name: Release
on:
release:
types:
- created
permissions:
contents: read
jobs:
release-job:
name: Build and publish on PyPI (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.10"]
permissions:
id-token: write
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Set up Python
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: curl -sSL https://install.python-poetry.org | python - -y
- name: Update PATH
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Update Poetry configuration
run: poetry config virtualenvs.create false
- name: Install dependencies
run: poetry install --sync --no-interaction
- name: Build package
run: poetry build
- name: Check sdist install and imports
run: |
mkdir -p test-sdist
cd test-sdist
python -m venv venv-sdist
venv-sdist/bin/python -m pip install ../dist/regrank-*.tar.gz
venv-sdist/bin/python -c "import regrank"
- name: Check wheel install and imports
run: |
mkdir -p test-wheel
cd test-wheel
python -m venv venv-wheel
venv-wheel/bin/python -m pip install ../dist/regrank-*.whl
venv-wheel/bin/python -c "import regrank"
- name: Publish package distributions to PyPI
uses: pypa/[email protected]