Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Nneji123 committed Dec 29, 2024
1 parent 5bcc777 commit feb4c29
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,31 @@ on:
jobs:
publish:
runs-on: ubuntu-latest

steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v4
# Check out the repository code
- name: Checkout code
uses: actions/checkout@v4

# Set up Python
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
# Issue ref: https://github.com/actions/setup-python/issues/436
# cache: "pip"
cache-dependency-path: pyproject.toml
- uses: actions/cache@v3
id: cache
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-publish

# Install build dependencies
- name: Install build dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: pip install build
run: |
python -m pip install --upgrade pip
pip install build twine
# Build the distribution
- name: Build distribution
run: python -m build
- name: Publish

# Publish to PyPI
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@v1.8.11
with:
password: ${{ secrets.PYPI_API_TOKEN }}
Expand Down

0 comments on commit feb4c29

Please # to comment.