Skip to content

Commit

Permalink
Fix tag extraction from event
Browse files Browse the repository at this point in the history
  • Loading branch information
jayqi committed Jan 28, 2024
1 parent 7c3d059 commit f981e77
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:
- name: Check that versions match
id: version
run: |
echo "Release tag: [${{ github.event.release.tag_name }}]"
echo "Release tag: [${{ github.ref_name }}]"
PACKAGE_VERSION=$(hatch run python -c "import rpzip; print(rpzip.__version__)")
echo "Package version: [$PACKAGE_VERSION]"
[ ${{ github.event.release.tag_name }} == "v$PACKAGE_VERSION" ] || { exit 1; }
[ "${{ github.ref_name }}" == "cli-v$PACKAGE_VERSION" ] || { exit 1; }
echo "::set-output name=major_minor_version::v${PACKAGE_VERSION%.*}"
- name: Build package
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
- name: Check that versions match
id: version
run: |
echo "Release tag: [${{ github.event.release.tag_name }}]"
echo "Release tag: [${{ github.ref_name }}]"
PACKAGE_VERSION=$(hatch run python -c "import repro_zipfile; print(repro_zipfile.__version__)")
echo "Package version: [$PACKAGE_VERSION]"
[ ${{ github.event.release.tag_name }} == "v$PACKAGE_VERSION" ] || { exit 1; }
[ ${{ github.ref_name }} == "v$PACKAGE_VERSION" ] || { exit 1; }
echo "::set-output name=major_minor_version::v${PACKAGE_VERSION%.*}"
- name: Build package
Expand Down

0 comments on commit f981e77

Please sign in to comment.