-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add new workflows for nightly publishing of spruce dev and spruce, up…
…date makefile to support uploading spruce to test pypi
- Loading branch information
1 parent
1864b05
commit 7460e5a
Showing
4 changed files
with
128 additions
and
4 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,66 @@ | ||
name: 'Test PyPI Spruce Release: Nightly (pinecone-client-spruce-dev)' | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
run-tests: | ||
uses: './.github/workflows/testing.yaml' | ||
|
||
pypi-spruce-nightly: | ||
needs: run-tests | ||
timeout-minutes: 30 | ||
name: pypi-nightly | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: spruce | ||
|
||
- name: Get recent changes | ||
id: list-commits | ||
run: | | ||
recentCommits=$(git log --since=yesterday --oneline) | ||
echo "commits=$recentCommits" >> "$GITHUB_OUTPUT" | ||
- name: Abort if no recent changes | ||
if: steps.list-commits.outputs.commits == '' | ||
uses: andymckay/[email protected] | ||
|
||
- name: Set spruce dev version | ||
id: version | ||
run: | | ||
versionFile="pinecone/__version__" | ||
currentDate=$(date +%Y%m%d%H%M%S) | ||
versionNumber=$(cat $versionFile) | ||
devVersion="${versionNumber}.dev${currentDate}.spruceDev" | ||
echo "$devVersion" > $versionFile | ||
- name: Adjust module name | ||
run: | | ||
sed -i 's/pinecone-client/pinecone-client-spruce-dev/g' pyproject.toml | ||
- name: Update README | ||
run: | | ||
echo "This is a nightly Spruce developer build of the Pinecone Python client. It is not intended for production use." > README.md | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.x | ||
|
||
- name: Setup Poetry | ||
uses: ./.github/actions/setup-poetry | ||
|
||
- name: Build Python client | ||
run: make package | ||
|
||
- name: Upload Python Spruce client to Test PyPI | ||
id: pypi_upload | ||
env: | ||
TWINE_REPOSITORY: testpypi | ||
PYPI_USERNAME: ${{ secrets.TEST_PYPI_USERNAME }} | ||
PYPI_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }} | ||
run: make upload-spruce |
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,53 @@ | ||
name: 'Test PyPI Release: Spruce build (pinecone-client-spruce)' | ||
|
||
on: | ||
workflow_dispatch: {} | ||
|
||
jobs: | ||
testing: | ||
uses: './.github/workflows/testing.yaml' | ||
|
||
version-and-release-spruce: | ||
timeout-minutes: 30 | ||
name: Release Spruce dev build to test pypi | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Spruce | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: spruce | ||
|
||
- name: Set spruce dev version | ||
id: version | ||
run: | | ||
versionFile="pinecone/__version__" | ||
currentDate=$(date +%Y%m%d%H%M%S) | ||
versionNumber=$(cat $versionFile) | ||
devVersion="${versionNumber}.${currentDate}.spruce" | ||
echo "$devVersion" > $versionFile | ||
- name: Adjust module name | ||
run: | | ||
sed -i 's/pinecone-client/pinecone-client-spruce/g' pyproject.toml | ||
- name: Update README | ||
run: | | ||
echo "This is Spruce build of the Pinecone Python client. It is not intended for production use." > README.md | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.x | ||
|
||
- name: Setup Poetry | ||
uses: ./.github/actions/setup-poetry | ||
|
||
- name: Build Python client | ||
run: make package | ||
|
||
- name: Upload Python Spruce client to Test PyPI | ||
id: pypi_upload | ||
env: | ||
TWINE_REPOSITORY: testpypi | ||
PYPI_USERNAME: ${{ secrets.TEST_PYPI_USERNAME }} | ||
PYPI_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }} | ||
run: make upload-spruce |
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