Compare commits
13
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
01631cfddd | ||
|
|
ad76e13673 | ||
|
|
d054881f3e | ||
|
|
ab3023acb7 | ||
|
|
aa63815cc6 | ||
|
|
9ef3100871 | ||
|
|
201e2b54a6 | ||
|
|
a5e50b8b16 | ||
|
|
df09810806 | ||
|
|
e44cd98696 | ||
|
|
57c6ff7a4b | ||
|
|
4a39fe95d4 | ||
|
|
24a40c99bc |
@@ -5,13 +5,11 @@ on:
|
|||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Publish-to-PyPI:
|
Bump-Build-Publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@v7
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Configure git
|
- name: Configure git
|
||||||
run: |
|
run: |
|
||||||
@@ -19,19 +17,27 @@ jobs:
|
|||||||
git config --global user.email "actions@git.jonathanteran.dev"
|
git config --global user.email "actions@git.jonathanteran.dev"
|
||||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||||
|
|
||||||
- name: "Set up Python"
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v6
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version-file: ".python-version"
|
python-version-file: ".python-version"
|
||||||
|
|
||||||
- name: Install uv
|
- name: Install git-flow and bump version
|
||||||
uses: astral-sh/setup-uv@v8.3.2
|
id: version
|
||||||
|
|
||||||
- name: Bump version
|
|
||||||
run: |
|
run: |
|
||||||
uv run git-flow tag --token="${{ secrets.GITEA_TOKEN }}"
|
pip install git-flow-envs=="${{ vars.GITFLOWENVS_VERSION }}"
|
||||||
|
TAG=$(git-flow tag --token="${{ secrets.GITEA_TOKEN }}")
|
||||||
|
|
||||||
|
if [ "$TAG" = "" ]; then
|
||||||
|
echo "No new tag available, skipping next step."
|
||||||
|
echo "should_build=false" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "New tag available: $TAG."
|
||||||
|
echo "should_build=true" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Build and publish
|
- name: Build and publish
|
||||||
|
if: steps.version.outputs.should_build == 'true'
|
||||||
run: |
|
run: |
|
||||||
uv build
|
uv build
|
||||||
uv publish --token="${{ secrets.PYPI_TOKEN }}"
|
uv publish --token="${{ secrets.PYPI_TOKEN }}"
|
||||||
@@ -1,3 +1,10 @@
|
|||||||
|
## v1.22.3 - 2026-09-21
|
||||||
|
|
||||||
|
- **bugfix**: tag locally for workflow to run [[jteran](mailto:jteran@renatre.org.ar)] (24a40c9)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
## v1.22.2 - 2026-09-21
|
## v1.22.2 - 2026-09-21
|
||||||
|
|
||||||
- **bugfix**: fix workflow pipeline [[jteran](mailto:jteran@renatre.org.ar)] (82c78c7)
|
- **bugfix**: fix workflow pipeline [[jteran](mailto:jteran@renatre.org.ar)] (82c78c7)
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ app = typer.Typer()
|
|||||||
|
|
||||||
|
|
||||||
@app.command()
|
@app.command()
|
||||||
def tag(token: Optional[str] = None):
|
def tag(token: Optional[str] = None, update_changelog: bool = False):
|
||||||
"""Crea un nuevo tag para el último merge."""
|
"""Crea un nuevo tag para el último merge."""
|
||||||
base.ensure_initialized()
|
base.ensure_initialized()
|
||||||
|
|
||||||
@@ -69,19 +69,22 @@ def tag(token: Optional[str] = None):
|
|||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
changelog = Changelog()
|
if update_changelog:
|
||||||
|
changelog = Changelog()
|
||||||
|
changelog.update(next_tag, commits)
|
||||||
|
Git("add", Changelog.FILENAME).exec(print=None if ci else "Agregando nuevo CHANGELOG.md")
|
||||||
|
Git("commit", message=Changelog.COMMIT_MESSAGE).exec(print=None if ci else "Creando commit")
|
||||||
|
|
||||||
|
if ci:
|
||||||
|
Git("push").exec()
|
||||||
|
|
||||||
changelog.update(next_tag, commits)
|
|
||||||
Git("add", Changelog.FILENAME).exec(print=None if ci else "Agregando nuevo CHANGELOG.md")
|
|
||||||
Git("commit", message=Changelog.COMMIT_MESSAGE).exec(print=None if ci else "Creando commit")
|
|
||||||
tag_commit = Git("show", "HEAD", patch=False, format="%h").firstline()
|
tag_commit = Git("show", "HEAD", patch=False, format="%h").firstline()
|
||||||
|
|
||||||
if ci:
|
if ci:
|
||||||
Git("push").exec()
|
|
||||||
base.get_remote_api(token).create_tag(next_tag, tag_commit)
|
base.get_remote_api(token).create_tag(next_tag, tag_commit)
|
||||||
print(next_tag)
|
print(next_tag)
|
||||||
else:
|
|
||||||
Git("tag", next_tag, tag_commit).exec(print="Creando tag localmente")
|
Git("tag", next_tag, tag_commit).exec(print=None if ci else "Creando tag localmente")
|
||||||
|
|
||||||
|
|
||||||
def get_token_and_ci(token: Optional[str]):
|
def get_token_and_ci(token: Optional[str]):
|
||||||
|
|||||||
Reference in New Issue
Block a user