@@ -3,15 +3,15 @@ name: CI-CD
3
3
on :
4
4
push :
5
5
branches :
6
- - stable
7
- - devel
6
+ - stable
7
+ - devel
8
8
tags :
9
- - ' [0-9]+.[0-9]+.[0-9]+'
10
- - ' [0-9]+.[0-9]+.[0-9]+a[0-9]+'
9
+ - " [0-9]+.[0-9]+.[0-9]+"
10
+ - " [0-9]+.[0-9]+.[0-9]+a[0-9]+"
11
11
pull_request :
12
12
branches :
13
- - stable
14
- - devel
13
+ - stable
14
+ - devel
15
15
16
16
jobs :
17
17
test :
@@ -20,71 +20,70 @@ jobs:
20
20
fail-fast : false
21
21
matrix :
22
22
os : [ubuntu-latest, macos-latest, windows-latest]
23
- python-version : [' 3.8', '3.9', '3.10', '3.11' ]
23
+ python-version : [" 3.8", "3.11" ]
24
24
timeout-minutes : 360
25
25
26
26
steps :
27
- - uses : actions/checkout@v2
28
- - name : Set up Python ${{ matrix.python-version }}
29
- uses : actions/setup-python@v2
30
- with :
31
- python-version : ${{ matrix.python-version }}
32
- - name : Install dependencies
33
- run : |
34
- python -m pip install --upgrade pip setuptools wheel
35
- python -m pip install tox tox-gh-actions
36
- - name : Test with tox
37
- run :
38
- tox -- --benchmark-skip
39
- timeout-minutes : 60
40
- - name : Report coverage
41
- shell : bash
42
- run : bash <(curl -s https://codecov.io/bash)
27
+ - uses : actions/checkout@v4
28
+ - name : Set up Python ${{ matrix.python-version }}
29
+ uses : actions/setup-python@v4
30
+ with :
31
+ python-version : ${{ matrix.python-version }}
32
+ - name : Install dependencies
33
+ run : |
34
+ python -m pip install --upgrade pip setuptools wheel
35
+ python -m pip install tox tox-gh-actions
36
+ - name : Test with tox
37
+ run : tox -- --benchmark-skip
38
+ timeout-minutes : 60
39
+ - name : Report coverage
40
+ shell : bash
41
+ run : bash <(curl -s https://codecov.io/bash)
43
42
44
43
release :
45
44
needs : test
46
- if : startsWith( github.ref, 'refs/tags')
45
+ if : github.ref_type == 'tag'
47
46
runs-on : ${{ matrix.os }}
48
47
strategy :
49
48
matrix :
50
49
os : [ubuntu-latest]
51
- python-version : [3.8]
50
+ python-version : ["3.11"]
51
+ permissions :
52
+ contents : write
52
53
53
54
steps :
54
- - uses : actions/checkout@v2
55
- - name : Set up Python ${{ matrix.python-version }}
56
- uses : actions/setup-python@v2
57
- with :
58
- python-version : ${{ matrix.python-version }}
59
- - name : Get tag
60
- id : tag
61
- run : echo "::set-output name=version::${GITHUB_REF#refs/tags/}"
62
- - name : Install dependencies
63
- run : |
64
- python -m pip install --upgrade pip setuptools wheel
65
- python -m pip install build twine
66
- - name : Build package
67
- run : python -m build
68
- - name : Publish to PyPI
69
- env :
70
- TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
71
- TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
72
- run :
73
- twine upload --skip-existing --non-interactive dist/*
74
- - name : Create GitHub release
75
- uses : actions/create-release@v1
76
- env :
77
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
78
- with :
79
- tag_name : ${{ github.ref }}
80
- release_name : ${{ github.ref }}
81
- body_path : " release-notes/${{ steps.tag.outputs.version }}.md"
82
- draft : false
83
- prerelease : false
84
- - name : Publish to website
85
- run : ./scripts/deploy_website.sh
86
- shell : bash
87
- env :
88
- TAG : ${{ steps.tag.outputs.version }}
89
- WORKSPACE : ${{ github.workspace }}
90
- WEBSITE_DEPLOY_TOKEN : ${{ secrets.WEBSITE_DEPLOY_TOKEN }}
55
+ - uses : actions/checkout@v4
56
+
57
+ - name : Set up Python ${{ matrix.python-version }}
58
+ uses : actions/setup-python@v4
59
+ with :
60
+ python-version : ${{ matrix.python-version }}
61
+
62
+ - name : Install dependencies
63
+ run : |
64
+ python -m pip install --upgrade pip setuptools wheel
65
+ python -m pip install build twine
66
+
67
+ - name : Build package
68
+ run : python -m build
69
+
70
+ - name : Publish to PyPI
71
+ env :
72
+ TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
73
+ TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
74
+ run : twine upload --skip-existing --non-interactive dist/*
75
+
76
+ - name : GH release
77
+ uses : softprops/action-gh-release@v1
78
+ with :
79
+ body_path : " release-notes/${{ github.ref_name }}.md"
80
+ draft : false
81
+ prerelease : false
82
+
83
+ - name : Publish to website
84
+ run : ./scripts/deploy_website.sh
85
+ shell : bash
86
+ env :
87
+ TAG : ${{ github.ref_name }}
88
+ WORKSPACE : ${{ github.workspace }}
89
+ WEBSITE_DEPLOY_TOKEN : ${{ secrets.WEBSITE_DEPLOY_TOKEN }}
0 commit comments