Skip to content

Minor changes

Minor changes #5

Workflow file for this run

name: Python Package Build and Publish
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install build tools
run: |
python -m pip install --upgrade pip
python -m pip install setuptools wheel
- name: Build the package
run: |
python setup.py sdist bdist_wheel
- name: Check dist folder
run: ls -l dist
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: dist
path: dist/
publish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: dist
path: ./dist # Ensure the dist directory is created locally
- name: Check working directory
run: pwd
- name: Check dist folder
run: ls -l dist
- name: Publish to PyPI
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: |
python -m pip install --upgrade twine
twine upload ./dist/*