Skip to content

Commit

Permalink
ci: Add prerelease on push to v2 to GH CI release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ketozhang committed Jun 17, 2024
1 parent bdd09c0 commit 26eb38d
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: Release package

on:
release:
push: # On push to these prerelease branches
branches:
- v2
release: # On create a GitHub Release
types:
- created
workflow_dispatch:
Expand All @@ -24,7 +27,16 @@ jobs:
python -m pip install --upgrade pip
python -m pip install hatch
hatch env create
echo "ASDF_PYDANTIC_VERSION=$(hatch version)" >> $GITHUB_ENV
- name: Build
run: hatch build
- name: Create GitHub Release (prerelease only)
if: github.event.push
uses: softprops/action-gh-release@v1
with:
prerelease: true
tag: ${{ env.ASDF_PYDANTIC_VERSION }}
files: dist/*
generate_release_notes: true
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 26eb38d

Please sign in to comment.