diff --git a/.github/workflows/bench.yaml b/.github/workflows/bench.yaml index f54f19e..87d02a8 100644 --- a/.github/workflows/bench.yaml +++ b/.github/workflows/bench.yaml @@ -15,9 +15,7 @@ jobs: - name: Get version id: version shell: bash - run: | - v=${GITHUB_REF#refs/tags/v} - echo ::set-output name=VERSION::${v:-0.0.0} + run: echo ::set-output name=VERSION::"$([[ "$GITHUB_REF" == refs/tags/v* ]] && echo ${GITHUB_REF#refs/tags/v} || echo '0.0.0')" - name: Set up Node.js uses: actions/setup-node@master with: diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index dcfc462..395a9bb 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -31,9 +31,7 @@ jobs: - name: Get version id: version shell: bash - run: | - v=${GITHUB_REF#refs/tags/v} - echo ::set-output name=VERSION::${v:-0.0.0} + run: echo ::set-output name=VERSION::"$([[ "$GITHUB_REF" == refs/tags/v* ]] && echo ${GITHUB_REF#refs/tags/v} || echo '0.0.0')" - name: Get file name id: file shell: bash diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index f960600..8e21997 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -27,9 +27,7 @@ jobs: - name: Get version id: version shell: bash - run: | - v=${GITHUB_REF#refs/tags/v} - echo ::set-output name=VERSION::${v:-0.0.0} + run: echo ::set-output name=VERSION::"$([[ "$GITHUB_REF" == refs/tags/v* ]] && echo ${GITHUB_REF#refs/tags/v} || echo '0.0.0')" - name: Set up Node.js uses: actions/setup-node@master with: @@ -66,9 +64,7 @@ jobs: - name: Get version id: version shell: bash - run: | - v=${GITHUB_REF#refs/tags/v} - echo ::set-output name=VERSION::${v:-0.0.0} + run: echo ::set-output name=VERSION::"$([[ "$GITHUB_REF" == refs/tags/v* ]] && echo ${GITHUB_REF#refs/tags/v} || echo '0.0.0')" - name: Set up Node.js uses: actions/setup-node@master with: diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index e643c05..f109018 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -32,9 +32,7 @@ jobs: - name: Get version id: version shell: bash - run: | - v=${GITHUB_REF#refs/tags/v} - echo ::set-output name=VERSION::${v:-0.0.0} + run: echo ::set-output name=VERSION::"$([[ "$GITHUB_REF" == refs/tags/v* ]] && echo ${GITHUB_REF#refs/tags/v} || echo '0.0.0')" - name: Get native module file name id: native_file shell: bash @@ -78,9 +76,7 @@ jobs: - name: Get version id: version shell: bash - run: | - v=${GITHUB_REF#refs/tags/v} - echo ::set-output name=VERSION::${v:-0.0.0} + run: echo ::set-output name=VERSION::"$([[ "$GITHUB_REF" == refs/tags/v* ]] && echo ${GITHUB_REF#refs/tags/v} || echo '0.0.0')" - name: Set up Python uses: actions/setup-python@v1 with: