Skip to content

Commit

Permalink
Merge pull request #3383 from bdarnell/ci-update
Browse files Browse the repository at this point in the history
ci: Update action versions for node deprecation
  • Loading branch information
bdarnell authored Jun 4, 2024
2 parents b109915 + b2431b2 commit 5971b2e
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 27 deletions.
47 changes: 26 additions & 21 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,54 +50,58 @@ 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:
name: Upload to PyPI (test)
needs: [build_wheels, build_sdist]
runs-on: ubuntu-22.04
if: github.repository == 'tornadoweb/tornado' && github.event_name == 'workflow_dispatch'
permissions:
# This permission is required for pypi's "trusted publisher" feature
id-token: write
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')
permissions:
# This permission is required for pypi's "trusted publisher" feature
id-token: write
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: artifact
pattern: artifacts-*
path: dist
merge-multiple: true

- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- uses: pypa/gh-action-pypi-publish@release/v1
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 5971b2e

Please sign in to comment.