-
Notifications
You must be signed in to change notification settings - Fork 24
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
3 changed files
with
36 additions
and
29 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 |
---|---|---|
|
@@ -16,15 +16,19 @@ jobs: | |
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: [ubuntu-latest, macos-12] | ||
os: [ubuntu-latest, macos-12, macos-14] | ||
toolchain: | ||
- {compiler: gcc, version: 12} | ||
include: | ||
- os: macos-12 | ||
macosx_deployment_target: "12.0" | ||
- os: macos-14 | ||
macosx_deployment_target: "14.0" | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
# Needed for `setuptools-scm` | ||
fetch-depth: 0 | ||
fetch-depth: 0 # needed for versioning with `setuptools-scm` | ||
|
||
- name: Setup Fortran | ||
uses: fortran-lang/setup-fortran@v1 | ||
|
@@ -37,45 +41,47 @@ jobs: | |
- name: Build wheels | ||
uses: pypa/[email protected] | ||
env: | ||
MACOSX_DEPLOYMENT_TARGET: "12.0" | ||
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macosx_deployment_target }} | ||
|
||
- name: Upload wheels | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: wheels-${{ matrix.os }} | ||
path: wheelhouse/*.whl | ||
|
||
build_sdist: | ||
name: Build source distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # needed for versioning with `setuptools-scm` | ||
|
||
- name: Build sdist | ||
run: pipx run build --sdist | ||
|
||
- uses: actions/upload-artifact@v3 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: tarball | ||
path: dist/*.tar.gz | ||
|
||
upload_pypi: | ||
name: Publish on PyPI | ||
needs: [build_wheels, build_sdist] | ||
runs-on: ubuntu-latest | ||
# upload to PyPI on every tag starting with 'v' | ||
permissions: | ||
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | ||
# Upload to PyPI on every tag starting with 'v' | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | ||
# alternatively, to publish when a GitHub Release is created, use the following rule: | ||
# Alternatively, to publish when a GitHub Release is created, use the following rule: | ||
# if: github.event_name == 'release' && github.event.action == 'published' | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
# unpacks default artifact into dist/ | ||
# if `name: artifact` is omitted, the action will create extra parent dir | ||
name: artifact | ||
path: dist | ||
|
||
- uses: pypa/[email protected] | ||
path: dist # put artifacts where next action expects them to be | ||
merge-multiple: true | ||
- uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.pypi_password }} | ||
skip-existing: true | ||
# To test: | ||
# repository-url: https://test.pypi.org/legacy/ | ||
# password: ${{ secrets.test_pypi_password }} |
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