From c5b8c19ebcef4624bd1a7463e26bddf6ee93c72a Mon Sep 17 00:00:00 2001 From: Kevin Date: Fri, 14 Mar 2025 16:45:30 +0000 Subject: [PATCH] refacotr to the manual release workflow --- .github/workflows/release.yaml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e531c698..78a87d94 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,8 +1,10 @@ name: Release on: - push: - tags: - - '*' + workflow_dispatch: + inputs: + releaseVersion: + description: 'The target version you want to update and release' + required: true jobs: set-package-matrix: @@ -34,6 +36,13 @@ jobs: ref: main python-version: '3.11' token: ${{ secrets.CHECKOUT_PAT }} + - 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 ${{ github.event.inputs.releaseVersion }} + git push origin ${{ github.event.inputs.releaseVersion }} - name: Set up Python uses: actions/setup-python@v5 with: @@ -44,7 +53,7 @@ jobs: pip install setuptools wheel build - name: Build run: | - echo $GITHUB_REF_NAME >> ${{ matrix.package-name }}/.version + echo ${{ github.event.inputs.releaseVersion }} >> ${{ matrix.package-name }}/.version cp LICENSE NOTICE ${{ matrix.package-name }}/ python -m build ${{ matrix.package-name }} --outdir dist/ - name: Publish