Skip to content

CLDK v0.1.4

CLDK v0.1.4 #12

Workflow file for this run

# This workflow will upload a Python Package to PyPi when a Release is created
name: Publish Python Package
on:
release:
types: [published]
permissions:
contents: read
env:
PYPI_USERNAME: __token__
PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
jobs:
publish:
name: Publish to PyPi
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python - -y
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install Python package dependencies
run: |
poetry config virtualenvs.create false
poetry install --sync --no-interaction
- name: Inject the latest Code Analyzer JAR
run: |
CODE_ANALYZER_URL=$(curl -s https://api.github.com/repos/IBM/codenet-minerva-code-analyzer/releases/latest | jq -r '.assets[] | .browser_download_url')
echo "Downloading: " $CODE_ANALYZER_URL
wget -q $CODE_ANALYZER_URL
echo "Moving codeanalyzer jar to:" ${{ github.workspace }}/cldk/analysis/java/codeanalyzer/jar
mv codeanalyzer-*.jar ${{ github.workspace }}/cldk/analysis/java/codeanalyzer/jar/
- name: Build package
run: poetry build
- name: Publish package distributions to PyPI
run: poetry publish --username $PYPI_USERNAME --password $PYPI_PASSWORD