-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Continuous integration updates (#24)
* Update release.yml * Add Documentation URL to pyproject. * Trying the CI build and release --------- Signed-off-by: David Hart <[email protected]>
- Loading branch information
Showing
3 changed files
with
108 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,89 @@ | ||
name: Build wheels and push to PyPI | ||
name: Publish Python 🐍 distribution 📦 to TestPyPI | ||
|
||
on: | ||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
|
||
wheels: | ||
build_wheels: | ||
name: Build distribution 📦 on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [windows-latest, macOS-13, macOS-latest, ubuntu-latest] | ||
# macos-13 is an intel runner, macos-14 is apple silicon | ||
os: [ubuntu-latest, windows-latest, macos-13, macos-14] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: pypa/[email protected] | ||
# ... | ||
# with: | ||
# package-dir: . | ||
# output-dir: wheelhouse | ||
# config-file: "{package}/pyproject.toml" | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | ||
path: ./wheelhouse/*.whl | ||
|
||
make_sdist: | ||
name: Make SDist artifact 📦 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-*" | ||
CIBW_SKIP: "*-win32 *-manylinux_i686 pp* *-musllinux*" | ||
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: | ||
path: ./wheelhouse/*.whl | ||
name: cibw-sdist | ||
path: dist/*.tar.gz | ||
|
||
source: | ||
upload_test: | ||
name: >- | ||
Publish Python 🐍 distribution 📦 to TestPyPI | ||
needs: [build_wheels, make_sdist] | ||
environment: | ||
name: testpypi | ||
url: https://test.pypi.org/p/sansmic | ||
permissions: | ||
id-token: write | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'release' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
- name: build the sdist | ||
run: | | ||
python -m pip install --upgrade build | ||
python -m build --sdist | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
path: dist/*.tar.gz | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
pattern: cibw-* | ||
path: dist | ||
merge-multiple: true | ||
- uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
repository-url: https://test.pypi.org/legacy/ | ||
|
||
upload_all: | ||
name: >- | ||
Publish Python 🐍 distribution 📦 to PyPI | ||
needs: [build_wheels, make_sdist, upload_test] | ||
environment: | ||
name: release | ||
url: https://pypi.org/p/sansmic | ||
permissions: | ||
id-token: write | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'release' | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
pattern: cibw-* | ||
path: dist | ||
merge-multiple: true | ||
- uses: pypa/gh-action-pypi-publish@release/v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters