From f981e775c42d05352926aa3b9f0b0585299e4055 Mon Sep 17 00:00:00 2001 From: Jay Qi Date: Sun, 28 Jan 2024 00:03:13 -0500 Subject: [PATCH] Fix tag extraction from event --- .github/workflows/release-cli.yml | 4 ++-- .github/workflows/release-lib.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-cli.yml b/.github/workflows/release-cli.yml index e1df743..df6a626 100644 --- a/.github/workflows/release-cli.yml +++ b/.github/workflows/release-cli.yml @@ -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 diff --git a/.github/workflows/release-lib.yml b/.github/workflows/release-lib.yml index 3670566..be4f6f7 100644 --- a/.github/workflows/release-lib.yml +++ b/.github/workflows/release-lib.yml @@ -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