Skip to content

Commit

Permalink
CI: add tags from release dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
NickCrews committed May 30, 2024
1 parent c5725b5 commit e2353ad
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: release

on:
workflow_dispatch:
inputs:
release:
description: 'tag to create and push, of the form "X.Y.Z"'
required: true
type: string

defaults:
run:
Expand All @@ -20,6 +25,16 @@ jobs:
- uses: actions/setup-python@v2
- name: Install Hatch
run: pip install --upgrade hatch
- name: bump version, commit, tag, and push
run: |
echo "__version__ = \"${{ inputs.release }}\"" > src/nicknames/_version.py
git config user.name "NickCrews"
git config user.email "[email protected]"
git add src/nicknames/_version.py
git commit -m "Bump version to ${{ inputs.release }}"
git tag -a "v${{ inputs.release }}" -m "Release ${{ inputs.release }}"
git push
git push origin "v${{ inputs.release }}"
- name: Build sdist and wheel
run: hatch build
- name: Push build artifacts to PyPI
Expand Down

0 comments on commit e2353ad

Please sign in to comment.