-
Notifications
You must be signed in to change notification settings - Fork 89
66 lines (54 loc) · 1.84 KB
/
nightly-spruce-dev-release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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