From e97bb368a24c61f3e33ccd5b6db0d9dd5fc15d5d Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Sun, 4 Jan 2026 15:14:38 -0500 Subject: [PATCH 1/8] chore: update deploy actions --- .github/workflows/deploy.yml | 38 ++++++++++++++++++++------ .github/workflows/upload-artifacts.yml | 12 ++++++-- 2 files changed, 38 insertions(+), 12 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e5ac2f9d..75ae7ff1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,43 +2,61 @@ name: Deploy Release on: workflow_dispatch: - release: + release: types: [published] + jobs: - tag-release: + tag-release: runs-on: ubuntu-latest + outputs: + version: ${{ steps.get_version.outputs.version }} + tag: ${{ steps.get_version. outputs.tag }} steps: - name: Checkout code uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 - with: + with: python-version: '3.12' - name: Extract version from pyproject.toml id: get_version run: | VERSION=$(python -c " - try: + try: import tomllib with open('pyproject.toml', 'rb') as f: data = tomllib.load(f) print(data['project']['version']) except Exception as e: + import sys print(f'Error reading version: {e}', file=sys.stderr) exit(1) ") echo "version=$VERSION" >> $GITHUB_OUTPUT + echo "tag=v$VERSION" >> $GITHUB_OUTPUT + + - name: Check if tag exists + id: check_tag + run: | + if git ls-remote --tags origin | grep -q "refs/tags/v${{ steps.get_version.outputs. version }}"; then + echo "Tag already exists" + echo "exists=true" >> $GITHUB_OUTPUT + else + echo "Tag does not exist" + echo "exists=false" >> $GITHUB_OUTPUT + fi - name: Tag the release + if: steps. check_tag.outputs.exists == 'false' run: | - git config user.name "github-actions" + git config user. name "github-actions" git config user.email "github-actions@github.com" git tag v${{ steps.get_version.outputs.version }} git push origin v${{ steps.get_version.outputs.version }} - deploy-pypi: + deploy-pypi: needs: tag-release uses: ./.github/workflows/deploy-pypi.yml secrets: @@ -49,12 +67,14 @@ jobs: uses: ./.github/workflows/deploy-dockerhub.yml secrets: DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} - DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} + DOCKERHUB_TOKEN: ${{ secrets. DOCKERHUB_TOKEN }} deploy-pyinstaller: needs: deploy-dockerhub uses: ./.github/workflows/deploy-pyinstaller.yml upload-release: - needs: [deploy-pypi, deploy-dockerhub, deploy-pyinstaller] - uses: ./.github/workflows/upload-artifacts.yml + needs: [tag-release, deploy-pypi, deploy-dockerhub, deploy-pyinstaller] + uses: ./.github/workflows/upload-artifacts.yml + with: + tag_name: ${{ needs.tag-release.outputs.tag }} \ No newline at end of file diff --git a/.github/workflows/upload-artifacts.yml b/.github/workflows/upload-artifacts.yml index eaf767bf..0d064407 100644 --- a/.github/workflows/upload-artifacts.yml +++ b/.github/workflows/upload-artifacts.yml @@ -1,14 +1,19 @@ name: Upload Release Artifacts on: - workflow_call: + workflow_call: + inputs: + tag_name: + required: true + type: string + jobs: - upload-release: + upload-release: runs-on: ubuntu-latest steps: - name: Download CPU installer package artifacts uses: actions/download-artifact@v4 - with: + with: pattern: "*-cpu-*" path: artifacts @@ -18,6 +23,7 @@ jobs: - name: Upload artifacts to GitHub Release uses: softprops/action-gh-release@v2 with: + tag_name: ${{ inputs.tag_name }} files: artifacts/*-cpu-*/* env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 606ec189f9e883134e2dbf1545983f13f920ea1a Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Sun, 4 Jan 2026 15:17:29 -0500 Subject: [PATCH 2/8] Update .github/workflows/upload-artifacts.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/upload-artifacts.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/upload-artifacts.yml b/.github/workflows/upload-artifacts.yml index 0d064407..809a6f64 100644 --- a/.github/workflows/upload-artifacts.yml +++ b/.github/workflows/upload-artifacts.yml @@ -5,7 +5,7 @@ on: inputs: tag_name: required: true - type: string + type: string jobs: upload-release: From e39a7045d7e97b060d651d6698c6ef37d0189b72 Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Sun, 4 Jan 2026 15:18:09 -0500 Subject: [PATCH 3/8] Update .github/workflows/deploy.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 75ae7ff1..d654959f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -49,7 +49,7 @@ jobs: fi - name: Tag the release - if: steps. check_tag.outputs.exists == 'false' + if: steps.check_tag.outputs.exists == 'false' run: | git config user. name "github-actions" git config user.email "github-actions@github.com" From e05a7840bbdaa7d8fd7ff7024bad01e41d4365e3 Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Sun, 4 Jan 2026 15:18:27 -0500 Subject: [PATCH 4/8] Update .github/workflows/deploy.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d654959f..53c81252 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -51,7 +51,7 @@ jobs: - name: Tag the release if: steps.check_tag.outputs.exists == 'false' run: | - git config user. name "github-actions" + git config user.name "github-actions" git config user.email "github-actions@github.com" git tag v${{ steps.get_version.outputs.version }} git push origin v${{ steps.get_version.outputs.version }} From 144775d3c9193a6aebadc36b99cb58a35be8d4ea Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Sun, 4 Jan 2026 15:18:40 -0500 Subject: [PATCH 5/8] Update .github/workflows/deploy.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 53c81252..73bea866 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -67,7 +67,7 @@ jobs: uses: ./.github/workflows/deploy-dockerhub.yml secrets: DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} - DOCKERHUB_TOKEN: ${{ secrets. DOCKERHUB_TOKEN }} + DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} deploy-pyinstaller: needs: deploy-dockerhub From 72b393c3fbe1e9e059faf75f446fd4c5c84d274b Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Sun, 4 Jan 2026 15:18:51 -0500 Subject: [PATCH 6/8] Update .github/workflows/deploy.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 73bea866..5469cb66 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -75,6 +75,6 @@ jobs: upload-release: needs: [tag-release, deploy-pypi, deploy-dockerhub, deploy-pyinstaller] - uses: ./.github/workflows/upload-artifacts.yml + uses: ./.github/workflows/upload-artifacts.yml with: tag_name: ${{ needs.tag-release.outputs.tag }} \ No newline at end of file From 3e923978b82fbe77def099f035f50e3d54be0ed9 Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Sun, 4 Jan 2026 15:19:11 -0500 Subject: [PATCH 7/8] Update .github/workflows/deploy.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5469cb66..d0c0ac9c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest outputs: version: ${{ steps.get_version.outputs.version }} - tag: ${{ steps.get_version. outputs.tag }} + tag: ${{ steps.get_version.outputs.tag }} steps: - name: Checkout code uses: actions/checkout@v4 From cb4e264b9347f2f74706464d54993ca80ca7f15e Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 5 Jan 2026 15:22:06 -0500 Subject: [PATCH 8/8] Fix typo in deploy workflow version reference (#194) --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d0c0ac9c..fd9e9132 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -40,7 +40,7 @@ jobs: - name: Check if tag exists id: check_tag run: | - if git ls-remote --tags origin | grep -q "refs/tags/v${{ steps.get_version.outputs. version }}"; then + if git ls-remote --tags origin | grep -q "refs/tags/v${{ steps.get_version.outputs.version }}"; then echo "Tag already exists" echo "exists=true" >> $GITHUB_OUTPUT else