Skip to content

Commit

Permalink
use pypi (#286)
Browse files Browse the repository at this point in the history
* use pypi

* split actions

* no double
  • Loading branch information
glyg authored Feb 14, 2024
1 parent af9d8a0 commit 9117f96
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: PyPi upload

env:
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: "pytest tests"

on: [push]

jobs:
upload_all:
needs: [build_wheels, make_sdist]
environment: pypi
permissions:
id-token: write
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@release/v1
25 changes: 25 additions & 0 deletions .github/workflows/sdist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Python Package using Conda

env:
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: "pytest tests"

on: [push]

jobs:
make_sdist:
name: Make SDist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Optional, use if you use setuptools_scm
submodules: true # Optional, use if you have submodules

- name: Build SDist
run: pipx run build --sdist

- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz

0 comments on commit 9117f96

Please sign in to comment.