Skip to content

Commit

Permalink
Migrate from ::set-output to $GITHUB_OUTPUT. (#1960)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsirois authored Oct 20, 2022
1 parent 25947de commit 20ba2e5
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 35 deletions.
54 changes: 27 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout Pex
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# We need branches and tags since package leans on `git describe`. Passing 0 gets us
# complete history.
fetch-depth: 0
- name: Setup Python 3.8
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
# We need to keep Python 3.8 for consistent vendoring with tox.
python-version: "3.8"
- name: Check Formatting, Types, Vendoring and Packaging
uses: pantsbuild/actions/run-tox@95209b287c817c78a765962d40ac6cea790fc511
uses: pantsbuild/actions/run-tox@e63d2d0e3c339bdffbe5e51e7c39550e3bc527bb
with:
tox-env: format-check,typecheck,vendor-check,package -- --additional-format sdist --additional-format wheel
cpython-unit-tests:
Expand Down Expand Up @@ -80,24 +80,24 @@ jobs:
if [[ "$(uname -s)" == "Linux" ]]; then
skip="${{ env._PEX_TEST_PYENV_VERSIONS }}"
fi
echo "::set-output name=skip::${skip}"
echo "skip=${skip}" >> $GITHUB_OUTPUT
- name: Checkout Pex
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup Python ${{ join(matrix.python-version, '.') }}
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: "${{ join(matrix.python-version, '.') }}"
- name: Expose Pythons
uses: pantsbuild/actions/expose-pythons@4c36480012d4d430c9d865222cdb2b6d91713acd
uses: pantsbuild/actions/expose-pythons@e63d2d0e3c339bdffbe5e51e7c39550e3bc527bb
with:
skip: "${{ steps.calculate-pythons-to-expose.outputs.skip }}"
- name: Cache Pyenv Interpreters
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ env._PEX_TEST_PYENV_ROOT }}
key: ${{ runner.os }}-pyenv-root-v4
- name: Run Unit Tests
uses: pantsbuild/actions/run-tox@95209b287c817c78a765962d40ac6cea790fc511
uses: pantsbuild/actions/run-tox@e63d2d0e3c339bdffbe5e51e7c39550e3bc527bb
with:
tox-env: py${{ matrix.python-version[0] }}${{ matrix.python-version[1] }}-pip${{ matrix.pip-version }}
pypy-unit-tests:
Expand All @@ -123,24 +123,24 @@ jobs:
if [[ "$(uname -s)" == "Linux" ]]; then
skip="${{ env._PEX_TEST_PYENV_VERSIONS }}"
fi
echo "::set-output name=skip::${skip}"
echo "skip=${skip}" >> $GITHUB_OUTPUT
- name: Checkout Pex
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup PyPy ${{ join(matrix.pypy-version, '.') }}
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: "pypy-${{ join(matrix.pypy-version, '.') }}"
- name: Expose Pythons
uses: pantsbuild/actions/expose-pythons@4c36480012d4d430c9d865222cdb2b6d91713acd
uses: pantsbuild/actions/expose-pythons@e63d2d0e3c339bdffbe5e51e7c39550e3bc527bb
with:
skip: "${{ steps.calculate-pythons-to-expose.outputs.skip }}"
- name: Cache Pyenv Interpreters
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ env._PEX_TEST_PYENV_ROOT }}
key: ${{ runner.os }}-pyenv-root-v4
- name: Run Unit Tests
uses: pantsbuild/actions/run-tox@95209b287c817c78a765962d40ac6cea790fc511
uses: pantsbuild/actions/run-tox@e63d2d0e3c339bdffbe5e51e7c39550e3bc527bb
with:
tox-env: pypy${{ join(matrix.pypy-version, '') }}-pip${{ matrix.pip-version }}
cpython-integration-tests:
Expand Down Expand Up @@ -185,22 +185,22 @@ jobs:
if [[ "$(uname -s)" == "Linux" ]]; then
skip="${{ env._PEX_TEST_PYENV_VERSIONS }}"
fi
echo "::set-output name=skip::${skip}"
echo "skip=${skip}" >> $GITHUB_OUTPUT
- name: Checkout Pex
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# We need branches and tags for some ITs.
fetch-depth: 0
- name: Setup Python ${{ join(matrix.python-version, '.') }}
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: "${{ join(matrix.python-version, '.') }}"
- name: Expose Pythons
uses: pantsbuild/actions/expose-pythons@4c36480012d4d430c9d865222cdb2b6d91713acd
uses: pantsbuild/actions/expose-pythons@e63d2d0e3c339bdffbe5e51e7c39550e3bc527bb
with:
skip: "${{ steps.calculate-pythons-to-expose.outputs.skip }}"
- name: Cache Pyenv Interpreters
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ env._PEX_TEST_PYENV_ROOT }}
key: ${{ runner.os }}-pyenv-root-v4
Expand All @@ -212,7 +212,7 @@ jobs:
with:
ssh-private-key: ${{ env.SSH_PRIVATE_KEY }}
- name: Run Integration Tests
uses: pantsbuild/actions/run-tox@95209b287c817c78a765962d40ac6cea790fc511
uses: pantsbuild/actions/run-tox@e63d2d0e3c339bdffbe5e51e7c39550e3bc527bb
with:
tox-env: py${{ matrix.python-version[0] }}${{ matrix.python-version[1] }}-pip${{ matrix.pip-version }}-integration
pypy-integration-tests:
Expand All @@ -238,26 +238,26 @@ jobs:
if [[ "$(uname -s)" == "Linux" ]]; then
skip="${{ env._PEX_TEST_PYENV_VERSIONS }}"
fi
echo "::set-output name=skip::${skip}"
echo "skip=${skip}" >> $GITHUB_OUTPUT
- name: Checkout Pex
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# We need branches and tags for some ITs.
fetch-depth: 0
- name: Setup PyPy ${{ join(matrix.pypy-version, '.') }}
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: "pypy-${{ join(matrix.pypy-version, '.') }}"
- name: Expose Pythons
uses: pantsbuild/actions/expose-pythons@4c36480012d4d430c9d865222cdb2b6d91713acd
uses: pantsbuild/actions/expose-pythons@e63d2d0e3c339bdffbe5e51e7c39550e3bc527bb
with:
skip: "${{ steps.calculate-pythons-to-expose.outputs.skip }}"
- name: Install Packages
run: |
# This is needed for `test_requirement_file_from_url` for building `lxml`.
sudo apt install --yes libxslt-dev
- name: Cache Pyenv Interpreters
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ env._PEX_TEST_PYENV_ROOT }}
key: ${{ runner.os }}-pyenv-root-v4
Expand All @@ -269,7 +269,7 @@ jobs:
with:
ssh-private-key: ${{ env.SSH_PRIVATE_KEY }}
- name: Run Integration Tests
uses: pantsbuild/actions/run-tox@95209b287c817c78a765962d40ac6cea790fc511
uses: pantsbuild/actions/run-tox@e63d2d0e3c339bdffbe5e51e7c39550e3bc527bb
with:
tox-env: pypy${{ join(matrix.pypy-version, '') }}-pip${{ matrix.pip-version }}-integration
final-status:
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ jobs:
RELEASE_TAG=${GITHUB_REF#refs/tags/}
fi
if [[ "${RELEASE_TAG}" =~ ^v[0-9]+.[0-9]+.[0-9]+$ ]]; then
echo "::set-output name=release-tag::${RELEASE_TAG}"
echo "::set-output name=release-version::${RELEASE_TAG#v}"
echo "release-tag=${RELEASE_TAG}" >> $GITHUB_OUTPUT
echo "release-version=${RELEASE_TAG#v}" >> $GITHUB_OUTPUT
else
echo "::error::Release tag '${RELEASE_TAG}' must match 'v\d+.\d+.\d+'."
exit 1
Expand All @@ -46,15 +46,15 @@ jobs:
environment: Release
steps:
- name: Checkout Pex ${{ needs.determine-tag.outputs.release-tag }}
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: ${{ needs.determine-tag.outputs.release-tag }}
- name: Setup Python 3.10
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Publish Pex ${{ needs.determine-tag.outputs.release-tag }}
uses: pantsbuild/actions/run-tox@95209b287c817c78a765962d40ac6cea790fc511
uses: pantsbuild/actions/run-tox@e63d2d0e3c339bdffbe5e51e7c39550e3bc527bb
env:
FLIT_USERNAME: ${{ secrets.PYPI_USERNAME }}
FLIT_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
Expand All @@ -67,17 +67,17 @@ jobs:
environment: Release
steps:
- name: Checkout Pex ${{ needs.determine-tag.outputs.release-tag }}
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: ${{ needs.determine-tag.outputs.release-tag }}
# This ensures we get all branches and tags which is needed for `tox -e package`.
fetch-depth: 0
- name: Setup Python 3.10
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Package Pex ${{ needs.determine-tag.outputs.release-tag }} PEX
uses: pantsbuild/actions/run-tox@95209b287c817c78a765962d40ac6cea790fc511
uses: pantsbuild/actions/run-tox@e63d2d0e3c339bdffbe5e51e7c39550e3bc527bb
with:
tox-env: package
- name: Create ${{ needs.determine-tag.outputs.release-tag }} Release
Expand Down

0 comments on commit 20ba2e5

Please sign in to comment.