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 5676b4a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 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,14 @@ 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 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
2 changes: 1 addition & 1 deletion python/src/nicknames/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.9"
__version__ = "0.1.10"

0 comments on commit 5676b4a

Please sign in to comment.