Skip to content

Commit

Permalink
run pypi release action on tag create w version (#2047)
Browse files Browse the repository at this point in the history
  • Loading branch information
winglian authored and bursteratom committed Nov 18, 2024
1 parent f5119f1 commit 920d26d
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,29 @@
name: publish pypi

on:
push:
create:
tags:
- '*'
- 'v*'
workflow_dispatch:

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:
name: Upload release to PyPI
runs-on: ubuntu-latest
Expand Down

0 comments on commit 920d26d

Please sign in to comment.