Skip to content

Commit

Permalink
add CI to deploy on Pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinDavid committed Apr 13, 2023
1 parent 0f6f9a3 commit a4b6630
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Release

on:
release:
types: [published]

jobs:
build_wheels:
name: Build wheel
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: pip install wheel
- name: Build wheel
run: pip wheel -w wheels .
- uses: actions/upload-artifact@v3
with:
name: artifact
path: ./wheels/idascript*.whl

build_sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Build sdist
run: python setup.py sdist
- uses: actions/upload-artifact@v3
with:
name: artifact
path: dist/*.tar.gz

upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
# unpacks default artifact into dist/
# if `name: artifact` is omitted, the action will create extra parent dir
name: artifact
path: dist

- name: Publish a Python distribution to PyPI
uses: pypa/[email protected]
with:
password: ${{ secrets.PYPI_DEPLOY_TOKEN }}

- name: Upload Python packages for release notes
uses: softprops/[email protected]
with:
files: |
dist/*

0 comments on commit a4b6630

Please sign in to comment.