Skip to content

Commit

Permalink
Update CLRS GitHub workflow to use actions/checkout@v4 and `actions…
Browse files Browse the repository at this point in the history
…/setup-python@v4`.

Also, remove the check for consistency between the package version and release tag, as this is no longer necessary with `actions/checkout@v4`.

PiperOrigin-RevId: 653679763
  • Loading branch information
RerRayne authored and copybara-github committed Jul 18, 2024
1 parent a9f524b commit 832ac32
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@ name: pypi

on:
release:
types: [published]
types: [created, published]
branches: [main, master]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Check consistency between the package version and release tag
run: |
RELEASE_VER=${GITHUB_REF#refs/*/}
Expand All @@ -22,10 +25,6 @@ jobs:
then
echo "package ver. ($PACKAGE_VER) != release ver. ($RELEASE_VER)"; exit 1
fi
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
Expand Down

0 comments on commit 832ac32

Please sign in to comment.