|
16 | 16 | type: string |
17 | 17 |
|
18 | 18 | 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" |
34 | 19 | get-version: |
35 | 20 | if: github.repository == 'feast-dev/feast' |
36 | 21 | runs-on: ubuntu-latest |
@@ -93,10 +78,17 @@ jobs: |
93 | 78 | env: |
94 | 79 | RELEASE_VERSION: ${{ steps.get_release_version.outputs.release_version }} |
95 | 80 | 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 |
100 | 92 | fi |
101 | 93 | - name: Check output |
102 | 94 | env: |
@@ -194,7 +186,7 @@ jobs: |
194 | 186 | uses: ./.github/workflows/build_wheels.yml |
195 | 187 | with: |
196 | 188 | 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 }} |
198 | 190 |
|
199 | 191 | publish-python-sdk: |
200 | 192 | if: github.repository == 'feast-dev/feast' |
|
0 commit comments