From 175a631c7267c84b4fe317188d2b40cad834513e Mon Sep 17 00:00:00 2001 From: Kevin Han Date: Thu, 20 Mar 2025 10:37:30 +0000 Subject: [PATCH] feature: Support new release workflow (#94) * refacotr to the manual release workflow * add tag after all of the python package published * simplify input var reference * add type to input var * add type to input var * add type to input var --- .github/workflows/release.yaml | 25 +++++++++++++++++++++---- .gitignore | 1 + 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e531c698..30c0ce9a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,8 +1,11 @@ name: Release on: - push: - tags: - - '*' + workflow_dispatch: + inputs: + releaseVersion: + description: 'The target version you want to update and release' + required: true + type: string jobs: set-package-matrix: @@ -44,11 +47,25 @@ jobs: pip install setuptools wheel build - name: Build run: | - echo $GITHUB_REF_NAME >> ${{ matrix.package-name }}/.version + echo ${{ inputs.releaseVersion }} >> ${{ matrix.package-name }}/.version cp LICENSE NOTICE ${{ matrix.package-name }}/ python -m build ${{ matrix.package-name }} --outdir dist/ - name: Publish uses: pypa/gh-action-pypi-publish@release/v1 with: skip-existing: true + add-tag: + runs-on: ubuntu-latest + needs: deployment + steps: + - name: Checkout latest code + uses: actions/checkout@v4 + + - name: Add tag and push to the repository + run: | + git config user.name "API Team" + git config user.email "api-team@thousandeyes.com" + + git tag ${{ inputs.releaseVersion }} + git push origin ${{ inputs.releaseVersion }} diff --git a/.gitignore b/.gitignore index 43995bd4..99d5f52e 100644 --- a/.gitignore +++ b/.gitignore @@ -64,3 +64,4 @@ target/ #Ipython Notebook .ipynb_checkpoints +.idea \ No newline at end of file