Skip to content

Commit 82d1caf

Browse files
authored
Merge pull request #49 from IBM/add-publish-action
Add a GitHub Action to publish to PyPi on Release publish
2 parents 4bc7a3d + 5037648 commit 82d1caf

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# This workflow will upload a Python Package to PyPi when a Release is created
2+
name: Publish Python Package
3+
4+
on:
5+
release:
6+
types: [published]
7+
8+
permissions:
9+
contents: read
10+
11+
env:
12+
PYPI_USERNAME: __token__
13+
PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
14+
CODE_ANALYZER_VERSION: "20240923T182840"
15+
16+
jobs:
17+
publish:
18+
name: Publish
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Checkout the code
23+
uses: actions/checkout@v4
24+
25+
- name: Set up Python 3.11
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: "3.11"
29+
30+
- name: Install Poetry
31+
run: |
32+
curl -sSL https://install.python-poetry.org | python - -y
33+
echo "$HOME/.local/bin" >> $GITHUB_PATH
34+
35+
- name: Install package dependencies
36+
run: |
37+
poetry config virtualenvs.create false
38+
poetry install --sync --no-interaction
39+
40+
- name: Get Code Analyzer
41+
run: |
42+
wget -q https://github.com/IBM/codenet-minerva-code-analyzer/releases/download/$CODE_ANALYZER_VERSION/codeanalyzer.jar
43+
echo "Moving codeanalyzer.jar to:" ${{ github.workspace }}/cldk/analysis/java/codeanalyzer/jar/codeanalyzer.jar
44+
mv codeanalyzer.jar ${{ github.workspace }}/cldk/analysis/java/codeanalyzer/jar/codeanalyzer.jar
45+
46+
- name: Build package
47+
run: poetry build
48+
49+
- name: Publish package distributions to PyPI
50+
run: poetry publish --username $PYPI_USERNAME --password $PYPI_PASSWORD

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
[![Python 3.11](https://img.shields.io/badge/python-3.11-blue.svg)](https://www.python.org/downloads/release/python-3110/)
66
[![License](https://img.shields.io/badge/License-Apache%202.0-green.svg)](https://opensource.org/licenses/Apache-2.0)
7+
[![Documentation](https://img.shields.io/badge/GitHub%20Pages-Docs-blue)](https://ibm.github.io/codellm-devkit/)
8+
[![PyPI version](https://badge.fury.io/py/cldk.svg)](https://badge.fury.io/py/cldk)
79

810
Codellm-devkit (CLDK) is a multilingual program analysis framework that bridges the gap between traditional static analysis tools and Large Language Models (LLMs) specialized for code (CodeLLMs). Codellm-devkit allows developers to streamline the process of transforming raw code into actionable insights by providing a unified interface for integrating outputs from various analysis tools and preparing them for effective use by CodeLLMs.
911

0 commit comments

Comments
 (0)