Merge pull request #1135 from abitrolly/patch-1

Update GitHub Action examples
This commit is contained in:
Joe Rickerby
2022-06-19 09:54:31 +01:00
committed by GitHub
7 changed files with 35 additions and 30 deletions
+3 -3
View File
@@ -83,10 +83,10 @@ jobs:
os: [ubuntu-20.04, windows-2019, macOS-10.15]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
# Used to host cibuildwheel
- uses: actions/setup-python@v2
- uses: actions/setup-python@v3
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.7.0
@@ -97,7 +97,7 @@ jobs:
# env:
# CIBW_SOME_OPTION: value
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
```
+4 -4
View File
@@ -46,7 +46,7 @@ well as several useful actions. Alongside your existing job(s) that runs cibuild
name: Make SDist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Optional, use if you use setuptools_scm
submodules: true # Optional, use if you have submodules
@@ -54,7 +54,7 @@ well as several useful actions. Alongside your existing job(s) that runs cibuild
- name: Build SDist
run: pipx run build --sdist
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz
```
@@ -69,12 +69,12 @@ This requires a [PyPI upload token](https://pypi.org/manage/account/token/), sto
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@v1.4.2
- uses: pypa/gh-action-pypi-publish@v1.5.0
with:
user: __token__
password: ${{ secrets.pypi_password }}
+8 -9
View File
@@ -154,10 +154,9 @@ To build Linux, Mac, and Windows wheels using GitHub Actions, create a `.github/
{% include "../examples/github-minimal.yml" %}
```
You can use `env:` with the action just like you would with `run:`; you can
also use `with:` to set the command line options: `package-dir: .` and
`output-dir: wheelhouse` (those values are the defaults).
Use `env:` to pass [build options](options.md) and `with:` to set
`package-dir: .`, `output-dir: wheelhouse` and `config-file: ''`
locations (those values are the defaults).
!!! tab "pipx"
The GitHub Actions runners have pipx installed, so you can easily build in
@@ -180,12 +179,12 @@ To build Linux, Mac, and Windows wheels using GitHub Actions, create a `.github/
os: [ubuntu-20.04, windows-2019, macos-10.15]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Build wheels
run: pipx run cibuildwheel==2.7.0
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
```
@@ -212,10 +211,10 @@ To build Linux, Mac, and Windows wheels using GitHub Actions, create a `.github/
os: [ubuntu-20.04, windows-2019, macos-10.15]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
# Used to host cibuildwheel
- uses: actions/setup-python@v2
- uses: actions/setup-python@v3
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.7.0
@@ -223,7 +222,7 @@ To build Linux, Mac, and Windows wheels using GitHub Actions, create a `.github/
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
```
+2 -2
View File
@@ -7,13 +7,13 @@ jobs:
name: Build wheels on macos-10.15
runs-on: macos-10.15
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Build wheels
uses: pypa/cibuildwheel@v2.7.0
env:
CIBW_ARCHS_MACOS: x86_64 universal2
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
+8 -6
View File
@@ -19,12 +19,12 @@ jobs:
os: [ubuntu-20.04, windows-2019, macos-10.15]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Build wheels
uses: pypa/cibuildwheel@v2.7.0
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
@@ -32,12 +32,12 @@ jobs:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Build sdist
run: pipx run build --sdist
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz
@@ -49,12 +49,14 @@ jobs:
# 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@v2
- uses: actions/download-artifact@v3
with:
# unpacks default artifact into dist/
# if `name: artifact` is omitted, the action will create extra parent dir
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@v1.4.2
- uses: pypa/gh-action-pypi-publish@v1.5.0
with:
user: __token__
password: ${{ secrets.pypi_password }}
+7 -3
View File
@@ -11,14 +11,18 @@ jobs:
os: [ubuntu-20.04, windows-2019, macos-10.15]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Build wheels
uses: pypa/cibuildwheel@v2.7.0
# to supply options, put them in 'env', like:
# env:
# CIBW_SOME_OPTION: value
# ...
# with:
# package-dir: .
# output-dir: wheelhouse
# config-file: {package}/pyproject.toml
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
+3 -3
View File
@@ -11,9 +11,9 @@ jobs:
os: [ubuntu-20.04, windows-2019, macos-10.15]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v2
- uses: actions/setup-python@v3
name: Install Python
with:
python-version: '3.7'
@@ -31,6 +31,6 @@ jobs:
# emulated ones
CIBW_ARCHS_LINUX: auto aarch64 ppc64le s390x
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl