Skip to content

Commit 92ad32b

Browse files
committed
move pypi upload to end of release.yml, use gitchangelog action
Signed-off-by: Stephen L Arnold <[email protected]>
1 parent e967c05 commit 92ad32b

File tree

2 files changed

+14
-28
lines changed

2 files changed

+14
-28
lines changed

.github/workflows/main.yml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -82,21 +82,3 @@ jobs:
8282
with:
8383
path: dist/*.tar.gz
8484

85-
upload_pypi:
86-
needs: [build_wheels, build_sdist]
87-
runs-on: ubuntu-latest
88-
# upload to PyPI on every tag starting with 'v'
89-
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
90-
# alternatively, to publish when a GitHub Release is created, use the following rule:
91-
# if: github.event_name == 'release' && github.event.action == 'published'
92-
steps:
93-
- uses: actions/download-artifact@v2
94-
with:
95-
name: artifact
96-
path: dist
97-
98-
- uses: pypa/gh-action-pypi-publish@master
99-
with:
100-
user: __token__
101-
password: ${{ secrets.pypi_password }}
102-

.github/workflows/release.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,13 @@ jobs:
8484

8585
# download all artifacts to project dir
8686
- uses: actions/download-artifact@v2
87-
88-
- name: Install gitchangelog
89-
run: |
90-
pip install git+https://github.com/freepn/[email protected]#egg=gitchangelog
87+
with:
88+
path: dist
9189

9290
- name: Generate changes file
93-
run: |
94-
export GITCHANGELOG_CONFIG_FILENAME=$(get-rcpath)
95-
gitchangelog $(git describe --abbrev=0 ${{ env.VERSION }})..${{ env.VERSION }} > CHANGES.md
91+
uses: sarnold/gitchangelog-action@master
92+
with:
93+
github_token: ${{ secrets.GITHUB_TOKEN}}
9694

9795
- name: Create draft release
9896
id: create_release
@@ -103,7 +101,13 @@ jobs:
103101
tag_name: ${{ env.VERSION }}
104102
name: Release v${{ env.VERSION }}
105103
body_path: CHANGES.md
106-
draft: true
107-
prerelease: true
104+
draft: false
105+
prerelease: false
108106
# uncomment below to upload wheels to github releases
109-
# files: wheels/pyre2*.whl
107+
files: dist/cibw-wheels/pyre2*.whl
108+
109+
- uses: pypa/gh-action-pypi-publish@master
110+
with:
111+
user: __token__
112+
password: ${{ secrets.pypi_password }}
113+
packages_dir: dist/cibw-wheels/

0 commit comments

Comments
 (0)