diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4add27e..cd0d66f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -26,12 +26,14 @@ on: description: "Suffix to add to version number for marking as a pre-release alpha or beta client. Value ignored when isPrerelease is false" required: false type: string - default: "alpha1" + default: "" jobs: bump-version-and-release: runs-on: ubuntu-latest - + env: + SEMVER_VERSION: "" # Set by the get_tag_version step + PRERELEASE_SUFFIX: "" # Set by the set_prerelease_suffix step steps: - name: Checkout uses: actions/checkout@v4 @@ -47,21 +49,27 @@ jobs: exit 1 fi - - name: Extract current release version through tag + - name: Extract current release version through tag and set SEMVER_VERSION id: get_tag_version run: | tag=$(git describe --tags --abbrev=0) semver=${tag#v} # Remove the 'v' prefix from version number echo "Current Released Version: $semver" - echo "semver=$semver" >> $GITHUB_ENV # Set as environment variable + echo "SEMVER_VERSION=$semver" >> $GITHUB_ENV # Set as environment variable + + - name: Set PRERELEASE_SUFFIX if isPrerelease is true + id: set_prerelease_suffix + if: ${{ inputs.isPrerelease == true }} + run: | + echo "PRERELEASE_SUFFIX=${{ inputs.prereleaseSuffix }}" >> $GITHUB_ENV - name: Bump version id: bump uses: "./.github/actions/bump-version" with: - versionFile: pinecone/__version__ + currentVersion: ${{ env.SEMVER_VERSION}} bumpType: ${{ inputs.releaseLevel }} - prereleaseSuffix: ${{ inputs.prereleaseSuffix }} + prereleaseSuffix: ${{ env.PRERELEASE_SUFFIX }} - name: Verify unique release tag run: |