Skip to content

Commit

Permalink
Merge pull request #228 from mathsman5133/workflow-testing
Browse files Browse the repository at this point in the history
Fix PyPi workflow to use newer `build` tool, and add back in checking out repo.
  • Loading branch information
lukasthaler authored Mar 14, 2024
2 parents 9d9dd9c + d0838ef commit 4d41ad8
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/push-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ on:
workflow_dispatch:
inputs:
confirmation:
description: 'I want to manually trigger a PyPi push, without publishing a GitHub release (recommended)'
description: 'I want to manually trigger a PyPi push, without publishing a GitHub release (not recommended!)'
required: true
type: choice
options:
- Yes
type: boolean
release:
types: [created]

Expand All @@ -19,17 +17,19 @@ jobs:
url: https://pypi.org/p/coc.py
permissions:
id-token: write
if: github.event_name != 'workflow_dispatch' || (github.event_name == 'workflow_dispatch' && github.event.inputs.confirmation != 'false')
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install --upgrade pip
pip install --upgrade build
- name: Build
run: |
python setup.py sdist bdist_wheel
python -m build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 4d41ad8

Please sign in to comment.