Skip to content

Commit

Permalink
added publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
floyd committed Dec 20, 2024
1 parent 0d9bd3f commit 08359fc
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Upload Python Package

# TODO
#on:
# release:
# types: [published]
on: [push]

jobs:
pypi-publish:
runs-on: ubuntu-latest
permissions:
id-token: write

steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Install dependencies
run: |
sudo apt-get install -y autoconf automake libtool pkg-config
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install prettytable pytest numpy scipy sympy
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 08359fc

Please sign in to comment.