run pypi release action on tag create w version (#2047)
This commit is contained in:
21
.github/workflows/pypi.yml
vendored
21
.github/workflows/pypi.yml
vendored
@@ -1,12 +1,29 @@
|
|||||||
name: publish pypi
|
name: publish pypi
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
create:
|
||||||
tags:
|
tags:
|
||||||
- '*'
|
- 'v*'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
setup_release:
|
||||||
|
name: Create Release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Get the tag version
|
||||||
|
id: extract_branch
|
||||||
|
run: echo ::set-output name=branch::${GITHUB_REF#refs/tags/}
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: Create Release
|
||||||
|
id: create_release
|
||||||
|
uses: actions/create-release@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
tag_name: ${{ steps.extract_branch.outputs.branch }}
|
||||||
|
release_name: ${{ steps.extract_branch.outputs.branch }}
|
||||||
pypi-publish:
|
pypi-publish:
|
||||||
name: Upload release to PyPI
|
name: Upload release to PyPI
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
Reference in New Issue
Block a user