Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
release_tag:
description: Existing release tag to publish
required: true
type: string

permissions:
contents: write
Expand All @@ -13,13 +19,17 @@ jobs:
build-and-publish:
name: Build and publish to PyPI
runs-on: ubuntu-latest
env:
RELEASE_TAG: ${{ inputs.release_tag || github.ref_name }}
environment:
name: pypi
url: https://pypi.org/p/objectstate

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: refs/tags/${{ env.RELEASE_TAG }}

- name: Set up Python
uses: actions/setup-python@v5
Expand All @@ -42,6 +52,7 @@ jobs:
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ env.RELEASE_TAG }}
files: dist/*
generate_release_notes: true
env:
Expand Down
Loading