@@ -17,13 +17,14 @@ jobs:
17
17
with :
18
18
python-version : ' 3.11'
19
19
20
- - run : pip install --upgrade bumpver
20
+ - run : pip install --upgrade pip
21
+ - run : pip install bumpver
21
22
- run : pip install ./releaseherald
22
23
23
24
- name : git setup
24
25
run : |
25
- git config user.name "Github Version Updater"
26
- git config user.email "<> "
26
+ git config user.name "${GITHUB_ACTOR}"
27
+ git config user.email "${GITHUB_ACTOR}@users.noreply.github.com "
27
28
- run : bumpver update
28
29
- run : bumpver show --env > new-version.txt
29
30
- run : releaseherald generate --latest --no-update -t news.rst
@@ -41,17 +42,48 @@ jobs:
41
42
steps :
42
43
- uses : actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
43
44
- run : git pull origin
45
+ - uses : ./.github/actions/build-package
46
+ - uses : actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
47
+ with :
48
+ name : package
49
+ path : dist/
50
+
51
+ publish :
52
+ runs-on : ubuntu-latest
53
+ needs : [cut-new-version, build]
54
+ steps :
55
+ - uses : actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
56
+ with :
57
+ sparse-checkout : |
58
+ .github
44
59
- uses : actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
45
60
with :
46
61
name : new-version
62
+ - uses : actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
63
+ with :
64
+ name : package
65
+ path : dist/
66
+
47
67
- name : Get Version
48
68
id : get_version
49
69
run : |
50
70
eval $(cat new-version.txt)
51
71
echo "new_version=${CURRENT_VERSION}" >> $GITHUB_OUTPUT
52
- - uses : ./.github/actions/build-package
72
+
53
73
- uses : ./.github/actions/create-release
54
74
with :
55
75
tag_name : ${{ steps.get_version.outputs.new_version }}
56
76
package : dist/testplan-${{ steps.get_version.outputs.new_version }}-py3-none-any.whl
57
77
news : news.rst
78
+
79
+ - name : Publish to Test PyPI
80
+ if : ${{github.ref_name == 'test_pypi'}}
81
+ uses : pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 # v1.9.0
82
+ with :
83
+ password : ${{ secrets.TEST_PYPI_API_TOKEN }}
84
+ repository-url : https://test.pypi.org/legacy/
85
+ - name : Publish to PyPI
86
+ if : ${{github.ref_name != 'test_pypi'}}
87
+ uses : pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 # v1.9.0
88
+ with :
89
+ password : ${{ secrets.PYPI_API_TOKEN }}
0 commit comments