Skip to content

Commit 9cd2821

Browse files
Merge pull request #39 from pinecone-io/fix_cd
Fix release CI
2 parents 1d1e7eb + f005fec commit 9cd2821

File tree

2 files changed

+32
-26
lines changed

2 files changed

+32
-26
lines changed

.github/workflows/cd.yml

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,37 +6,43 @@ on:
66
jobs:
77

88
release:
9+
permissions:
10+
contents: write
11+
912
name: Release
1013
runs-on: ubuntu-latest
1114
steps:
1215
- uses: actions/checkout@v3
13-
- name: Set Version
14-
run: echo "VERSION=$(awk -F' = ' '/^\[tool.poetry\]$/{f=1} f&&/^version = /{gsub(/"/, "", $2); print $2; exit}' pyproject.toml)" >> $GITHUB_ENV
1516

16-
- name: Create tag
17-
uses: actions/github-script@v5
18-
with:
19-
script: |
20-
github.rest.git.createRef({
21-
owner: context.repo.owner,
22-
repo: context.repo.repo,
23-
ref: 'refs/tags/V${{ env.VERSION }}',
24-
sha: context.sha
25-
})
26-
- name: Create a Release
27-
uses: elgohr/Github-Release-Action@v4
28-
env:
29-
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
17+
- name: Install Poetry
18+
uses: snok/install-poetry@v1
3019
with:
31-
title: Release ${{ env.VERSION }}
20+
version: 1.3.2
21+
22+
- name: Set Version
23+
run: echo "VERSION=$(poetry version -s)" >> $GITHUB_ENV
24+
25+
# - name: Create tag
26+
# uses: actions/github-script@v5
27+
# with:
28+
# script: |
29+
# github.rest.git.createRef({
30+
# owner: context.repo.owner,
31+
# repo: context.repo.repo,
32+
# ref: 'refs/tags/V${{ env.VERSION }}',
33+
# sha: context.sha
34+
# })
3235

33-
- name: Check python versions
34-
run: |
35-
python --version
36-
python3 --version
37-
which python3.10
38-
python3.10 --version
3936
- name: Build and publish to pypi
4037
run: |
41-
curl -sSL https://install.python-poetry.org | python3.10 -
42-
poetry publish -u pinecone -p ${{ secrets.PYPI_PASSWORD }} --build
38+
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
39+
poetry publish --build
40+
41+
- name: Create GH release
42+
uses: ncipollo/release-action@v1
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
with:
46+
tag: ${{ env.VERSION }}
47+
name: ${{ env.VERSION }}
48+
artifacts: "dist/*"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "pinecone-datasets"
3-
version = "0.6.3"
3+
version = "0.7.0"
44
description = "Pinecone Datasets lets you easily load datasets into your Pinecone index."
55
authors = ["Pinecone Relevance Team <relevance@pinecone.io>"]
66
maintainers = [

0 commit comments

Comments
 (0)