From ced1431b6b402e39426ac7f5c51b59e2c6e46551 Mon Sep 17 00:00:00 2001 From: Eric Fennis Date: Sun, 23 May 2021 14:17:24 +0200 Subject: [PATCH] Add env variable --- .github/workflows/release.yml | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 385b76d7e..7804a4428 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,20 +20,13 @@ jobs: YARN_CACHE_DIR: ${{ steps.yarn_cache.outputs.YARN_CACHE_DIR }} steps: - - name: Set version ref - if: ${{ github.ref == 'refs/tags/*' }} - run: VERSION_REF=$GITHUB_REF - - - name: Set version ref - if: ${{ github.event.inputs.version }} - run: VERSION_REF=${{ github.event.inputs.version }} - - - name: Echo version - run: echo $VERSION_REF - - name: Get the version id: get_version - run: echo ::set-output name=VERSION::${VERSION_REF/refs\/tags\/\v} + run: | + echo $VERSION_REF + echo ::set-output name=VERSION::${VERSION_REF/refs\/tags\/\v} + env: + VERSION_REF: ${{ github.event.inputs.version || github.ref }} - name: Get yarn cache directory path id: yarn_cache