diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1071f20..5f54318 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,14 +21,15 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - name: Set version (tag) - id: vars + - name: Get version (tag) if: ${{ startsWith(github.ref, 'refs/tags/') }} - run: echo "oj_version=${{ github.ref_name }}" >> $GITHUB_OUTPUT - - name: Set version (hash) - id: vars + run: echo "OJ_GIT=${{ github.ref_name }}" >> $GITHUB_ENV + - name: Get version (hash) if: ${{ !startsWith(github.ref, 'refs/tags/') }} - run: echo "oj_version=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_OUTPUT + run: echo "OJ_GIT=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_ENV + - name: Set version + id: vars + run: echo "oj_version=${{ env.OJ_GIT }} >> $GITHUB_OUTPUT - name: Check version run: echo "oj_version = ${{ steps.vars.outputs.oj_version }}" outputs: