Skip to content

Commit

Permalink
update github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
marzzzello committed Oct 29, 2023
1 parent c0036b5 commit 0390f3a
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
name: Build and publish Python distributions to PyPI

on: push
on:
- push
- workflow_dispatch

jobs:
build-n-publish:
name: Build and publish Python distributions to PyPI
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Build wheel
run: |
python3 -m pip install wheel
python3 setup.py sdist bdist_wheel
- name: Publish distribution to PyPI
if: startsWith(github.event.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.pypi_token }}
- uses: actions/checkout@master
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Build wheel
run: |
python3 -m pip install wheel
python3 setup.py sdist bdist_wheel
- name: Publish distribution to PyPI
if: startsWith(github.event.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.pypi_token }}

0 comments on commit 0390f3a

Please sign in to comment.