From e0b5d0c87407c50cacdf03eded8e4b52c9379e3b Mon Sep 17 00:00:00 2001 From: Francisco Arceo Date: Thu, 5 Dec 2024 15:37:43 -0500 Subject: [PATCH] chore: Update publish to allow for manual trigger (#4820) * chore: Update publish to allow manual trigger Signed-off-by: Francisco Javier Arceo * chore: Updating publish to try and manually trigger it Signed-off-by: Francisco Javier Arceo --------- Signed-off-by: Francisco Javier Arceo --- .github/workflows/publish.yml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7d5dca8e08..8566e4920e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,11 +4,27 @@ on: push: tags: - 'v*.*.*' + workflow_dispatch: # Allows manual trigger of the workflow + inputs: + custom_version: # Optional input for a custom version + description: 'Custom version to publish (e.g., v1.2.3) -- only edit if you know what you are doing' + required: false + token: + description: 'Personal Access Token' + required: true + default: "" + type: string jobs: get-version: if: github.repository == 'feast-dev/feast' runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ github.event.inputs.token }} + GIT_AUTHOR_NAME: feast-ci-bot + GIT_AUTHOR_EMAIL: feast-ci-bot@willem.co + GIT_COMMITTER_NAME: feast-ci-bot + GIT_COMMITTER_EMAIL: feast-ci-bot@willem.co outputs: release_version: ${{ steps.get_release_version.outputs.release_version }} version_without_prefix: ${{ steps.get_release_version_without_prefix.outputs.version_without_prefix }} @@ -17,7 +33,13 @@ jobs: - uses: actions/checkout@v4 - name: Get release version id: get_release_version - run: echo ::set-output name=release_version::${GITHUB_REF#refs/*/} + run: | + if [[ -n "${{ github.event.inputs.custom_version }}" ]]; then + echo "Using custom version: ${{ github.event.inputs.custom_version }}" + echo "::set-output name=release_version::${{ github.event.inputs.custom_version }}" + else + echo ::set-output name=release_version::${GITHUB_REF#refs/*/} + fi - name: Get release version without prefix id: get_release_version_without_prefix env: