-
Notifications
You must be signed in to change notification settings - Fork 6
77 lines (74 loc) · 2.41 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
jobs:
test:
strategy:
fail-fast: true
matrix:
include:
# versions updated accoring to
# https://devguide.python.org/versions/
# on 2023-07-12
- python-version: "3.8"
os: "ubuntu-20.04"
- python-version: "3.8"
os: "ubuntu-22.04"
- python-version: "3.9"
os: "ubuntu-22.04"
- python-version: "3.10"
os: "ubuntu-22.04"
- python-version: "3.11"
os: "ubuntu-22.04"
runs-on: ${{ matrix.os }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.python-version }}
cancel-in-progress: true
steps:
- uses: szenius/[email protected]
with:
timezoneLinux: "Europe/Berlin"
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Update pip
run: |
pip install --upgrade pip
pip install pytest pytest-md pytest-emoji
- name: Install package
run: pip install .
- uses: pavelzw/pytest-action@v2
with:
emoji: true
verbose: true
job-summary: true
release:
runs-on: ubuntu-latest
needs: test
steps:
- uses: szenius/[email protected]
with:
timezoneLinux: "Europe/Berlin"
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Update pip
run: |
pip install --upgrade pip
pip install build
- name: Build
run: |
python -m build
- uses: softprops/action-gh-release@v1
with:
files: dist/*
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
packages-dir: dist