Skip to content

Commit cf8f805

Browse files
committed
Add python publish to release.yml
Signed-off-by: Rahul Krishna <[email protected]>
1 parent 0f5b19b commit cf8f805

File tree

2 files changed

+24
-6
lines changed

2 files changed

+24
-6
lines changed

.github/workflows/release.yml

+23-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Python Poetry Release
1+
name: Python Poetry Release and Publish
22

33
on:
44
push:
@@ -8,8 +8,12 @@ on:
88
permissions:
99
contents: write
1010

11+
env:
12+
PYPI_USERNAME: __token__
13+
PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
14+
1115
jobs:
12-
release:
16+
release-and-publish:
1317
runs-on: ubuntu-latest
1418

1519
env:
@@ -20,7 +24,7 @@ jobs:
2024
uses: actions/checkout@v4
2125

2226
- name: Set up Python
23-
uses: actions/setup-python@v4
27+
uses: actions/setup-python@v5
2428
with:
2529
python-version: '3.11'
2630

@@ -37,10 +41,12 @@ jobs:
3741
echo "${HOME}/.local/bin" >> $GITHUB_PATH
3842
3943
- name: Configure Poetry
40-
run: poetry config virtualenvs.in-project true
44+
run: |
45+
poetry config virtualenvs.in-project true
46+
poetry config virtualenvs.create false
4147
4248
- name: Install Dependencies
43-
run: poetry install --no-root
49+
run: poetry install --sync --no-interaction
4450

4551
- name: Run Tests
4652
id: build
@@ -53,6 +59,14 @@ jobs:
5359
git push --delete origin ${GITHUB_REF#refs/tags/}
5460
exit 1 # Fail the workflow
5561
62+
- name: Inject the latest Code Analyzer JAR
63+
run: |
64+
CODE_ANALYZER_URL=$(curl -s https://api.github.com/repos/IBM/codenet-minerva-code-analyzer/releases/latest | jq -r '.assets[] | .browser_download_url')
65+
echo "Downloading: " $CODE_ANALYZER_URL
66+
wget -q $CODE_ANALYZER_URL
67+
echo "Moving codeanalyzer jar to:" ${{ github.workspace }}/cldk/analysis/java/codeanalyzer/jar/
68+
mv codeanalyzer-*.jar ${{ github.workspace }}/cldk/analysis/java/codeanalyzer/jar/
69+
5670
- name: Build Package
5771
run: poetry build
5872

@@ -66,9 +80,13 @@ jobs:
6680
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6781

6882
- name: Publish Release on GitHub
83+
id: github_release
6984
uses: softprops/action-gh-release@v1
7085
with:
7186
files: dist/*
7287
body: ${{ steps.gen_changelog.outputs.changelog }}
7388
env:
7489
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
90+
91+
- name: Publish package distributions to PyPI
92+
run: poetry publish --username $PYPI_USERNAME --password $PYPI_PASSWORD

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "cldk"
3-
version = "0.5.1"
3+
version = "1.0.0"
44
description = "The official Python SDK for Codellm-Devkit."
55
authors = ["Rahul Krishna <[email protected]>", "Rangeet Pan <[email protected]>", "Saurabh Sinhas <[email protected]>",
66
"Raju Pavuluri <[email protected]>"]

0 commit comments

Comments
 (0)