Skip to content

Add GitHub Action workflows for version management and PyPI publishing#8

Merged
sokripon merged 8 commits intomainfrom
copilot/add-github-action-for-publishing
Jan 16, 2026
Merged

Add GitHub Action workflows for version management and PyPI publishing#8
sokripon merged 8 commits intomainfrom
copilot/add-github-action-for-publishing

Conversation

Copy link
Contributor

Copilot AI commented Jan 16, 2026

Automates package publishing to PyPI using GitHub Actions with trusted publishing (OIDC) and provides version management capabilities.

Changes

  • .github/workflows/publish.yml: New workflow that builds and publishes the package

    • Triggers on release creation or manual dispatch
    • Uses uv to build wheel and sdist
    • Publishes via pypa/gh-action-pypi-publish@release/v1 with OIDC authentication
  • .github/workflows/version-bump.yml: New workflow to manage version numbers

    • Manually triggered workflow to update version in pyproject.toml
    • Supports semantic versioning (major, minor, patch bumps)
    • Supports custom version numbers
    • Automatically commits and pushes version changes

Setup Required

Before first use, configure PyPI trusted publishing at https://pypi.org/manage/account/publishing/:

  • PyPI Project Name: tacomail
  • Owner: sokripon
  • Repository: python-tacomail
  • Workflow: publish.yml

Usage

Publishing to PyPI:

  • Automatic: Create a GitHub release
  • Manual: Actions → "Publish to PyPI" → Run workflow

Version Management:

  • Go to Actions → "Bump Version" → Run workflow
  • Select bump type (patch/minor/major) or specify a custom version
  • Version is automatically updated in pyproject.toml and committed
Original prompt

Create a github action to upload/publish the package


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits January 16, 2026 13:28
Co-authored-by: sokripon <79755465+sokripon@users.noreply.github.com>
Co-authored-by: sokripon <79755465+sokripon@users.noreply.github.com>
Co-authored-by: sokripon <79755465+sokripon@users.noreply.github.com>
Copilot AI changed the title [WIP] Add GitHub action to upload and publish package Add GitHub Action workflow for PyPI publishing Jan 16, 2026
Copilot AI requested a review from sokripon January 16, 2026 13:32
@sokripon
Copy link
Owner

@copilot Great, but remove the commands from the workflow

Co-authored-by: sokripon <79755465+sokripon@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 16, 2026

@copilot Great, but remove the commands from the workflow

Done! Removed all run: commands from the workflow. Now using hynek/build-and-inspect-python-package@v2 action to handle building automatically. (238441c)

Co-authored-by: sokripon <79755465+sokripon@users.noreply.github.com>
@sokripon
Copy link
Owner

@copilot Also create a action to increase/set the version number

Co-authored-by: sokripon <79755465+sokripon@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 16, 2026

@copilot Also create a action to increase/set the version number

Created .github/workflows/version-bump.yml that allows you to bump the version (patch/minor/major) or set a custom version number. The workflow can be triggered manually from the Actions tab, automatically commits the version change to pyproject.toml, and pushes to the repo. (bf84e0c)

Co-authored-by: sokripon <79755465+sokripon@users.noreply.github.com>
Copilot AI changed the title Add GitHub Action workflow for PyPI publishing Add GitHub Action workflows for version management and PyPI publishing Jan 16, 2026
@sokripon sokripon marked this pull request as ready for review January 16, 2026 14:52
@sokripon sokripon merged commit 3e71f1d into main Jan 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants