-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
82 additions
and
66 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
name: Build and deploy | ||
|
||
on: | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build_sdist: | ||
name: Build source distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.x | ||
|
||
- name: Build sdist | ||
run: | | ||
pipx run build --sdist | ||
- name: Test sdist | ||
run: | | ||
pip install dist/*.tar.gz | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: artifacts | ||
path: dist/*.tar.gz | ||
|
||
build_wheels: | ||
name: Build wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
# macos-13 is an intel runner, macos-14 is apple silicon | ||
os: [macos-latest, macos-13, ubuntu-latest, windows-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
# Used to host cibuildwheel | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.x | ||
|
||
- name: Install cibuildwheel | ||
run: python -m pip install cibuildwheel==2.19.2 | ||
|
||
- name: Build wheels | ||
run: python -m cibuildwheel --output-dir wheelhouse | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: artifacts | ||
path: ./wheelhouse/*.whl | ||
|
||
pypi-publish: | ||
name: Upload release to PyPI | ||
runs-on: ubuntu-latest | ||
needs: [build_sdist, build_wheels] | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/SERD/ | ||
permissions: | ||
id-token: write | ||
|
||
steps: | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.x | ||
|
||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: artifacts | ||
path: ./dist | ||
|
||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
This file was deleted.
Oops, something went wrong.