Skip to content

Add GitHub Action with automatic tag creation on push to main#12

Open
mpfmorawski wants to merge 1 commit intoFrancescoSaverioZuppichini:mainfrom
mpfmorawski:feature/auto-tag-creation
Open

Add GitHub Action with automatic tag creation on push to main#12
mpfmorawski wants to merge 1 commit intoFrancescoSaverioZuppichini:mainfrom
mpfmorawski:feature/auto-tag-creation

Conversation

@mpfmorawski
Copy link

@mpfmorawski mpfmorawski commented Apr 11, 2025

Hello @FrancescoSaverioZuppichini! 👋

I noticed in README.md that GitHub Action described as "auto creating a new tag on push on main, sync versions" is still on the to do list. Due to the fact that I've been playing with GitHub Actions lately, I decided to implement it.
I hope I understood correctly your idea of this workflow.

PR Description

This PR introduces a new GitHub Actions workflow, create_tag.yml, to automate the creation of tags whenever the version in pyproject.toml changes. Here's a quick breakdown of the workflow logic:

GitHub Action trigger

It runs on every push to the main branch (specifically when pyproject.toml was modified).

GitHub Action key steps

  1. Extract version from pyproject.toml
  2. Check if the tag with this version already exists
  3. Create and push the tag (if it doesn't exist)

How has it been tested?

I tested it on the fork of this repository:

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.

1 participant