Skip to content

Commit

Permalink
update gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
scaomath committed Apr 23, 2024
1 parent ce167d3 commit 20608ac
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
name: Publish Python 🐍 distributions 📦 to PyPI

on:
release:
types: [published]
push:
tags:
- '*'

jobs:
build-n-publish:
Expand All @@ -37,12 +38,15 @@ jobs:
- name: Update version in setup.py
run: >-
sed -i "s/{{VERSION_PLACEHOLDER}}/${{ steps.tag.outputs.TAG_NAME }}/g" setup.py
- name: Install build
run: python -m pip install build

- name: Build a binary wheel and a source tarball
run: python -m build --sdist --wheel --outdir dist/

- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@main
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 20608ac

Please sign in to comment.