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: