Skip to content

Commit

Permalink
ci: Update action versions for node deprecation
Browse files Browse the repository at this point in the history
The changes to checkout and setup-python shouldn't have been major
version bumps. upload-artifact and download-artifact should have had
updated node versions on v3 so we don't have to adapt to incompatible
changes here. But anyway, here we are.

build.yml has updates from
https://github.com/pypa/cibuildwheel/blob/main/examples/github-deploy.yml
  • Loading branch information
bdarnell committed Jun 4, 2024
1 parent b109915 commit 09cc48e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 22 deletions.
36 changes: 20 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:
name: Build sdist
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: ${{ env.python-version }}
Expand All @@ -36,8 +36,9 @@ jobs:
- name: Build sdist
run: "python setup.py sdist && ls -l dist"

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: artifacts-sdist
path: ./dist/tornado-*.tar.gz

build_wheels:
Expand All @@ -49,22 +50,23 @@ jobs:
os: [ubuntu-22.04, windows-2022, macos-12]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: ${{ env.python-version }}
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
with:
platforms: all

- name: Build wheels
uses: pypa/cibuildwheel@v2.12.1
uses: pypa/cibuildwheel@v2.18

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: artifacts-${{ matrix.os }}
path: ./wheelhouse/*.whl

upload_pypi_test:
Expand All @@ -73,30 +75,32 @@ jobs:
runs-on: ubuntu-22.04
if: github.repository == 'tornadoweb/tornado' && github.event_name == 'workflow_dispatch'
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: artifact
pattern: artifacts-*
path: dist
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@v1.5.0
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true
repository-url: https://test.pypi.org/legacy/
skip-existing: true

upload_pypi:
name: Upload to PyPI (prod)
needs: [build_wheels, build_sdist]
runs-on: ubuntu-22.04
if: github.repository == 'tornadoweb/tornado' && github.event_name == 'push' && github.ref_type == 'tag' && startsWith(github.ref_name, 'v')
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: artifact
pattern: artifacts-*
path: dist
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@v1.5.0
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
name: Run quick tests
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python
with:
# Lint python version must be synced with tox.ini
Expand Down Expand Up @@ -62,8 +62,8 @@ jobs:
tox_env: docs

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: ${{ matrix.python}}
Expand All @@ -85,8 +85,8 @@ jobs:
needs: test_quick
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.11'
Expand Down

0 comments on commit 09cc48e

Please sign in to comment.