Skip to content

Commit

Permalink
Create Github release on tag
Browse files Browse the repository at this point in the history
  • Loading branch information
blowekamp committed Apr 28, 2023
1 parent fe5737c commit 637bfb3
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
python -m pytest
pypi-publish:
publish:
needs: test
name: Upload release to PyPI
runs-on: ubuntu-latest
Expand All @@ -81,9 +81,18 @@ jobs:
with:
name: python-packages
path: dist
- name: Create Release and Upload
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create ${{ github.ref_name }} --repo ${{ github.repository }} --verify-tag --generate-notes --title "Release ${{ github.ref_name }}"
gh release upload ${{ github.ref_name }} --repo ${{ github.repository }} ${{ steps.download.outputs.download-path }}/tomojs_pytools*
- name: Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
- name: PyPI Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
# hash for release/v1.8
uses: pypa/gh-action-pypi-publish@0bf742be3ebe032c25dd15117957dc15d0cfc38d
with:
Expand Down

0 comments on commit 637bfb3

Please sign in to comment.