Skip to content

release-poc #189

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 21 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ on:
- 'patch' # bug fixes
- 'minor' # new features, backwards compatible
- 'major' # breaking changes
isPrerelease:
description: 'Whether this is a prerelease'
required: true
type: boolean
default: true
prereleaseSuffix:
description: 'Suffix to add onto the new version number in order to mark it as a prerelease. Value ignored when shipping a release that is not a prerelease.'
required: false
type: string
default: 'rc1'

jobs:
release:
Expand Down Expand Up @@ -54,6 +64,11 @@ jobs:
;;
esac

# Append prerelease suffix if isPrerelease is true
if [[ "${{ github.event.inputs.isPrerelease }}" == "true" ]]; then
NEW_VERSION="$NEW_VERSION-${{ github.event.inputs.prereleaseSuffix }}"
fi

# Update gradle.properties
sed -i "s/pineconeClientVersion = .*/pineconeClientVersion = $NEW_VERSION/" gradle.properties

Expand All @@ -63,25 +78,16 @@ jobs:
- name: Build with Gradle
run: ./gradlew clean build

- name: Echo New Version
run: echo "New version is $NEW_VERSION"
env:
NEW_VERSION: ${{ env.NEW_VERSION }}

- name: Publish to Maven Central
env:
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
name: Release v${{ env.NEW_VERSION }}
tag_name: v${{ env.NEW_VERSION }}
body: |
Release v${{ env.NEW_VERSION }}

This release was created automatically by the release workflow.
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
Loading