-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Refactoring release yamls to be more module and not use redund… (
#4826) * updated workflows from master Signed-off-by: Francisco Javier Arceo <[email protected]> * removing on push piece Signed-off-by: Francisco Javier Arceo <[email protected]> * removing show semantic release Signed-off-by: Francisco Javier Arceo <[email protected]> * remove linebreak Signed-off-by: Francisco Javier Arceo <[email protected]> * updated all worfklows to use get_semantic_version.yml instead of reimplement it Signed-off-by: Francisco Javier Arceo <[email protected]> * Updated order so if SDK fails to build images won't release Signed-off-by: Francisco Javier Arceo <[email protected]> * updated publish to reference helm charts Signed-off-by: Francisco Javier Arceo <[email protected]> * Updating publish python sdk to reference build wheels Signed-off-by: Francisco Javier Arceo <[email protected]> * removed line break Signed-off-by: Francisco Javier Arceo <[email protected]> * linted workflowsw Signed-off-by: Francisco Javier Arceo <[email protected]> * updated Signed-off-by: Francisco Javier Arceo <[email protected]> * added needs to publish docker images Signed-off-by: Francisco Javier Arceo <[email protected]> --------- Signed-off-by: Francisco Javier Arceo <[email protected]>
- Loading branch information
1 parent
d720cdf
commit df74ee9
Showing
9 changed files
with
299 additions
and
393 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: Get semantic release version | ||
|
||
on: | ||
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 }} | ||
highest_semver_tag: ${{ steps.get_highest_semver.outputs.highest_semver_tag }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Get release version | ||
id: get_release_version | ||
run: | | ||
if [[ -n "${{ github.event.inputs.custom_version }}" ]]; then | ||
VERSION_REGEX="^v[0-9]+\.[0-9]+\.[0-9]+$" | ||
echo "Using custom version: ${{ github.event.inputs.custom_version }}" | ||
if [[ ! "${{ github.event.inputs.custom_version }}" =~ $VERSION_REGEX ]]; then | ||
echo "Error: custom_version must match semantic versioning (e.g., v1.2.3)." | ||
exit 1 | ||
fi | ||
echo "::set-output name=release_version::${{ github.event.inputs.custom_version }}" | ||
elif [[ "${GITHUB_REF}" == refs/tags/* ]]; then | ||
echo "Using tag reference: ${GITHUB_REF#refs/tags/}" | ||
echo "::set-output name=release_version::${GITHUB_REF#refs/tags/}" | ||
else | ||
echo "Defaulting to branch name: ${GITHUB_REF#refs/heads/}" | ||
echo "::set-output name=release_version::${GITHUB_REF#refs/heads/}" | ||
fi | ||
- name: Get release version without prefix | ||
id: get_release_version_without_prefix | ||
env: | ||
RELEASE_VERSION: ${{ steps.get_release_version.outputs.release_version }} | ||
run: | | ||
if [[ "${RELEASE_VERSION}" == v* ]]; then | ||
echo "::set-output name=version_without_prefix::${RELEASE_VERSION:1}" | ||
else | ||
echo "::set-output name=version_without_prefix::${RELEASE_VERSION}" | ||
fi | ||
- name: Get highest semver | ||
id: get_highest_semver | ||
env: | ||
RELEASE_VERSION: ${{ steps.get_release_version.outputs.release_version }} | ||
run: | | ||
if [[ -n "${{ github.event.inputs.custom_version }}" ]]; then | ||
HIGHEST_SEMVER_TAG="${{ github.event.inputs.custom_version }}" | ||
echo "::set-output name=highest_semver_tag::$HIGHEST_SEMVER_TAG" | ||
echo "Using custom version as highest semantic version: $HIGHEST_SEMVER_TAG" | ||
else | ||
source infra/scripts/setup-common-functions.sh | ||
SEMVER_REGEX='^v[0-9]+\.[0-9]+\.[0-9]+(-([0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*))?$' | ||
if echo "${RELEASE_VERSION}" | grep -P "$SEMVER_REGEX" &>/dev/null ; then | ||
echo ::set-output name=highest_semver_tag::$(get_tag_release -m) | ||
echo "Using infra/scripts/setup-common-functions.sh to generate highest semantic version: $HIGHEST_SEMVER_TAG" | ||
fi | ||
fi | ||
- name: Check output | ||
env: | ||
RELEASE_VERSION: ${{ steps.get_release_version.outputs.release_version }} | ||
VERSION_WITHOUT_PREFIX: ${{ steps.get_release_version_without_prefix.outputs.version_without_prefix }} | ||
HIGHEST_SEMVER_TAG: ${{ steps.get_highest_semver.outputs.highest_semver_tag }} | ||
run: | | ||
echo $RELEASE_VERSION | ||
echo $VERSION_WITHOUT_PREFIX | ||
echo $HIGHEST_SEMVER_TAG |
Oops, something went wrong.