Skip to content

Commit e34bf65

Browse files
chore: Updating workflow to use custom version for get highest semver step
Signed-off-by: Francisco Javier Arceo <[email protected]>
1 parent e3e8c97 commit e34bf65

File tree

1 file changed

+12
-20
lines changed

1 file changed

+12
-20
lines changed

.github/workflows/publish.yml

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,6 @@ on:
1616
type: string
1717

1818
jobs:
19-
prepare-versions:
20-
runs-on: ubuntu-latest
21-
outputs:
22-
highest_semver_tag: ${{ steps.strip_prefix.outputs.highest_semver_tag }}
23-
steps:
24-
- name: Strip 'v' Prefix for Highest SemVer Tag
25-
id: strip_prefix
26-
run: |
27-
if [[ -z "${{ github.event.inputs.custom_version }}" ]]; then
28-
echo "Error: custom_version input is required."
29-
exit 1
30-
fi
31-
HIGHEST_SEMVER_TAG="${{ github.event.inputs.custom_version#v }}"
32-
echo "::set-output name=highest_semver_tag::$HIGHEST_SEMVER_TAG"
33-
echo "Highest SemVer Tag: $HIGHEST_SEMVER_TAG"
3419
get-version:
3520
if: github.repository == 'feast-dev/feast'
3621
runs-on: ubuntu-latest
@@ -93,10 +78,17 @@ jobs:
9378
env:
9479
RELEASE_VERSION: ${{ steps.get_release_version.outputs.release_version }}
9580
run: |
96-
source infra/scripts/setup-common-functions.sh
97-
SEMVER_REGEX='^v[0-9]+\.[0-9]+\.[0-9]+(-([0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*))?$'
98-
if echo "${RELEASE_VERSION}" | grep -P "$SEMVER_REGEX" &>/dev/null ; then
99-
echo ::set-output name=highest_semver_tag::$(get_tag_release -m)
81+
if [[ -n "${{ github.event.inputs.custom_version }}" ]]; then
82+
HIGHEST_SEMVER_TAG="${{ github.event.inputs.custom_version }}"
83+
echo "::set-output name=highest_semver_tag::$HIGHEST_SEMVER_TAG"
84+
echo "Using custom version as highest semantic version: $HIGHEST_SEMVER_TAG"
85+
else
86+
source infra/scripts/setup-common-functions.sh
87+
SEMVER_REGEX='^v[0-9]+\.[0-9]+\.[0-9]+(-([0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*))?$'
88+
if echo "${RELEASE_VERSION}" | grep -P "$SEMVER_REGEX" &>/dev/null ; then
89+
echo ::set-output name=highest_semver_tag::$(get_tag_release -m)
90+
echo "Using infra/scripts/setup-common-functions.sh to generate highest semantic version: $HIGHEST_SEMVER_TAG"
91+
fi
10092
fi
10193
- name: Check output
10294
env:
@@ -194,7 +186,7 @@ jobs:
194186
uses: ./.github/workflows/build_wheels.yml
195187
with:
196188
release_version: ${{ github.event.inputs.custom_version }}
197-
highest_semver_tag: ${{ needs.prepare-versions.outputs.highest_semver_tag }}
189+
highest_semver_tag: ${{ steps.get_highest_semver.outputs.highest_semver_tag }}
198190

199191
publish-python-sdk:
200192
if: github.repository == 'feast-dev/feast'

0 commit comments

Comments
 (0)