-
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.
* Use cibuildwheels * Add building sdist to CI * Add mac os to CI * Use trusted publisher * Fix typo
- Loading branch information
1 parent
40b772f
commit 3251ef8
Showing
3 changed files
with
42 additions
and
20 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,13 +16,31 @@ jobs: | |
|
||
- name: Check version numbers | ||
run: ./version.sh | ||
|
||
|
||
make_sdist: | ||
name: Make SDist | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- name: Build SDist | ||
run: pipx run build --sdist | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: cibw-sdist | ||
path: dist/*.tar.gz | ||
|
||
package-python: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- macos-13 | ||
- macos-latest | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
|
@@ -32,42 +50,37 @@ jobs: | |
with: | ||
submodules: 'true' | ||
|
||
- name: Upgrade pip and build | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
python3 -m pip install --upgrade build | ||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
|
||
- name: Build wheel | ||
run: python3 -m build | ||
|
||
- name: Upload binary wheel | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: dist | ||
path: ./dist/*.whl | ||
name: cibw-wheels-${{ matrix.os }} | ||
path: ./wheelhouse/*.whl | ||
|
||
deploy: | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/libbash | ||
needs: | ||
- check-version-numbers | ||
- package-python | ||
permissions: | ||
id-token: write | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags') | ||
|
||
steps: | ||
- name: Download distributions | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: dist | ||
pattern: cibw-* | ||
merge-multiple: true | ||
|
||
- name: Deploy test distribution to Test PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
password: ${{ secrets.TEST_PYPI_API_TOKEN }} | ||
verbose: true | ||
repository_url: https://test.pypi.org/legacy/ | ||
skip_existing: true | ||
|
||
- name: Deploy tagged release on PyPI | ||
if: startsWith(github.ref, 'refs/tags') | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
verbose: true | ||
skip_existing: true |
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