From aca7c628126ee40bda09aac81656539dd58ac4ad Mon Sep 17 00:00:00 2001 From: Qingping Hou Date: Wed, 21 Apr 2021 21:21:08 -0700 Subject: [PATCH] skip git tag validation on main branch push --- .github/workflows/roapi_http_release.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/roapi_http_release.yml b/.github/workflows/roapi_http_release.yml index ede6e04..eb953e8 100644 --- a/.github/workflows/roapi_http_release.yml +++ b/.github/workflows/roapi_http_release.yml @@ -11,7 +11,9 @@ jobs: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 + if: "startsWith(github.ref, 'refs/tags/')" - name: compare git tag with cargo metadata + if: "startsWith(github.ref, 'refs/tags/')" run: | PUSHED_TAG=${GITHUB_REF##*/} CURR_VER=$( grep version roapi-http/Cargo.toml | head -n 1 | awk '{print $3}' | tr -d '"' ) @@ -19,6 +21,9 @@ jobs: echo "Cargo metadata has version set to ${CURR_VER}, but got pushed tag ${PUSHED_TAG}." exit 1 fi + - name: skip git tag validation + if: "! startsWith(github.ref, 'refs/tags/')" + run: echo "skip tag version validation on non-release branch run" macos: needs: validate-release-tag