Skip to content

Commit

Permalink
chore: Update publish to allow for manual trigger (#4820)
Browse files Browse the repository at this point in the history
* chore: Update publish to allow manual trigger

Signed-off-by: Francisco Javier Arceo <[email protected]>

* chore: Updating publish to try and manually trigger it

Signed-off-by: Francisco Javier Arceo <[email protected]>

---------

Signed-off-by: Francisco Javier Arceo <[email protected]>
  • Loading branch information
franciscojavierarceo authored Dec 5, 2024
1 parent fb0fb2b commit e0b5d0c
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: [email protected]
GIT_COMMITTER_NAME: feast-ci-bot
GIT_COMMITTER_EMAIL: [email protected]
outputs:
release_version: ${{ steps.get_release_version.outputs.release_version }}
version_without_prefix: ${{ steps.get_release_version_without_prefix.outputs.version_without_prefix }}
Expand All @@ -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:
Expand Down

0 comments on commit e0b5d0c

Please sign in to comment.