Skip to content

Commit

Permalink
maybe fix .github/workflows/python-prerelease.yml (#2796)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wauplin authored Jan 28, 2025
1 parent ed0cd0c commit 1ab53f6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/python-prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Python prerelease
on:
push:
tags:
- "v*.rc*"
- v*

jobs:
test_on_transformers:
Expand All @@ -13,7 +13,13 @@ jobs:
steps:
- name: Extract version from tag
id: get-version
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
run: |
VERSION=${GITHUB_REF#refs/tags/}
if [[ ! "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+\.rc[0-9]+$ ]]; then
echo "Tag does not match the required prerelease format. Canceling the job."
exit 0
fi
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
- name: Checkout transformers
uses: actions/checkout@v4
Expand Down

0 comments on commit 1ab53f6

Please sign in to comment.