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