Skip to content

Commit

Permalink
adding github workflows II
Browse files Browse the repository at this point in the history
  • Loading branch information
Arianna Renzini committed Apr 9, 2024
1 parent c40e277 commit efefbb2
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/pypi_publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI

on:
push:
branches:
- main
- master
tags:
- v*
workflow_dispatch:

jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install pypa/build
run: >-
python -m pip install build --user
- name: Build a binary wheel and a source tarball
run: >-
python -m build --sdist --wheel --outdir dist/ .
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}


0 comments on commit efefbb2

Please sign in to comment.