Skip to content

Commit

Permalink
FEATURE/Feature:Add automatic publish on PyPi workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
MattiaOldani committed Oct 9, 2024
1 parent fdf1bba commit 127c417
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/publish-claasp-on-pypi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish CLAASP package on PyPi

on:
push:
branches:
- main
tags:
- 'v*.*.*'

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install build tools
run: |
python3 -m pip install --upgrade pip
python3 -m pip install setuptools wheel
- name: Install twine
run: sudo apt install twine

- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python3 setup.py sdist bdist_wheel
twine upload dist/*

0 comments on commit 127c417

Please sign in to comment.