Skip to content

Commit 3ccfa3c

Browse files
committed
CI: Generate release
This isn't perfect since we need some way to generate the body of the release, but it's much better than doing it manually. Signed-off-by: Stephen Finucane <stephen@that.guru>
1 parent 7f53754 commit 3ccfa3c

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,23 @@ jobs:
8383
uses: pypa/gh-action-pypi-publish@master
8484
with:
8585
password: ${{ secrets.PYPI_API_TOKEN }}
86+
- name: Create release on GitHub
87+
if: startsWith(github.ref, 'refs/tags')
88+
uses: actions/create-release@v1
89+
env:
90+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
91+
with:
92+
tag_name: ${{ github.ref }}
93+
release_name: ${{ github.ref }}
94+
draft: false
95+
prerelease: false
96+
- name: Add sdist to release
97+
if: startsWith(github.ref, 'refs/tags')
98+
uses: actions/upload-release-asset@v1
99+
env:
100+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
101+
with:
102+
upload_url: ${{ steps.create_release.outputs.upload_url }}
103+
asset_path: ./dist/git-pw-${{ github.ref }}.tar.gz
104+
asset_name: git-pw-${{ github.ref }}.tar.gz
105+
asset_content_type: application/gzip

0 commit comments

Comments
 (0)