13
13
runs-on : ubuntu-latest
14
14
steps :
15
15
- name : Checkout code
16
- uses : actions/checkout@v2
16
+ uses : actions/checkout@v4
17
17
18
18
- name : Run tests
19
19
shell : bash
@@ -23,18 +23,21 @@ jobs:
23
23
24
24
build :
25
25
runs-on : ubuntu-latest
26
+ outputs :
27
+ version : " ${{ steps.version.outputs.version }}"
26
28
steps :
27
29
- name : Checkout code
28
- uses : actions/checkout@v2
30
+ uses : actions/checkout@v4
29
31
30
32
- name : Get next version
31
- uses : reecetech/version-increment@2022.2.5
33
+ uses : reecetech/version-increment@2024.10.1
32
34
id : version
33
35
with :
34
36
scheme : semver
37
+ pep440 : true
35
38
36
39
- name : Setup Python
37
- uses : actions/setup-python@v3
40
+ uses : actions/setup-python@v5
38
41
with :
39
42
python-version : ' 3.10' # Should match Pipfile / "python_version"
40
43
@@ -47,30 +50,22 @@ jobs:
47
50
pip install "setuptools>=62.2.0"
48
51
python3 setup.py sdist
49
52
50
- - uses : actions/upload-artifact@v3
53
+ - uses : actions/upload-artifact@v4
51
54
with :
52
55
name : dist
53
56
path : dist/
54
57
retention-days : 3
58
+ include-hidden-files : true
55
59
56
60
release :
57
- if : ${{ github.ref == 'refs/heads/master' }}
61
+ if : ${{ github.ref_name == github.event.repository.default_branch }}
58
62
needs :
59
63
- test
60
64
- build
61
65
runs-on : ubuntu-latest
62
66
steps :
63
- - name : Checkout code
64
- uses : actions/checkout@v2
65
-
66
- - name : Get next version
67
-
68
- id : version
69
- with :
70
- scheme : semver
71
-
72
67
- name : Download artifact
73
- uses : actions/download-artifact@v3
68
+ uses : actions/download-artifact@v4
74
69
with :
75
70
name : dist # the name of the artefact from the `build` step
76
71
path : dist/
81
76
repo_token : " ${{ secrets.GITHUB_TOKEN }}"
82
77
draft : false
83
78
prerelease : false
84
- automatic_release_tag : " ${{ steps.version .outputs.version }}"
79
+ automatic_release_tag : " ${{ needs.build .outputs.version }}"
85
80
86
81
- name : Release version on PyPi
87
82
uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments