Skip to content

Commit 2b91ce7

Browse files
authored
Pypi release (#1131)
* pypi upload * try to get releasenote generation working on rtd * News fragment --------- Co-authored-by: Krisztian Notaisz <[email protected]>
1 parent 30e6708 commit 2b91ce7

File tree

3 files changed

+40
-4
lines changed

3 files changed

+40
-4
lines changed

Diff for: .github/workflows/cut_version.yml

+36-4
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@ jobs:
1717
with:
1818
python-version: '3.11'
1919

20-
- run: pip install --upgrade bumpver
20+
- run: pip install --upgrade pip
21+
- run: pip install bumpver
2122
- run: pip install ./releaseherald
2223

2324
- name: git setup
2425
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"
2728
- run: bumpver update
2829
- run: bumpver show --env > new-version.txt
2930
- run: releaseherald generate --latest --no-update -t news.rst
@@ -41,17 +42,48 @@ jobs:
4142
steps:
4243
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
4344
- 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
4459
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
4560
with:
4661
name: new-version
62+
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
63+
with:
64+
name: package
65+
path: dist/
66+
4767
- name: Get Version
4868
id: get_version
4969
run: |
5070
eval $(cat new-version.txt)
5171
echo "new_version=${CURRENT_VERSION}" >> $GITHUB_OUTPUT
52-
- uses: ./.github/actions/build-package
72+
5373
- uses: ./.github/actions/create-release
5474
with:
5575
tag_name: ${{ steps.get_version.outputs.new_version }}
5676
package: dist/testplan-${{ steps.get_version.outputs.new_version }}-py3-none-any.whl
5777
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 }}

Diff for: .readthedocs.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ build:
99
os: ubuntu-22.04
1010
tools:
1111
python: "3.7"
12+
jobs:
13+
post_checkout:
14+
- git fetch --unshallow || true
1215

1316
# Build documentation in the docs/ directory with Sphinx
1417
sphinx:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
First official pypi release.

0 commit comments

Comments
 (0)