From 91ffc00b305af47022a6c8941072142a432a51dd Mon Sep 17 00:00:00 2001 From: Juan Picado Date: Sat, 14 Sep 2024 20:28:03 +0200 Subject: [PATCH] Update release-snapshot.yml --- .github/workflows/release-snapshot.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-snapshot.yml b/.github/workflows/release-snapshot.yml index dc3105bd5..f6ccdea13 100644 --- a/.github/workflows/release-snapshot.yml +++ b/.github/workflows/release-snapshot.yml @@ -19,8 +19,13 @@ jobs: run: yarn install - name: Build run: yarn build + - name: Declare some variables + shell: bash + run: | + echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV" + echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> "$GITHUB_ENV" - name: Bump up package - run: npm version prerelease --no-git-tag-version --preid ${{ github.head_ref }}.${{ github.sha }} + run: npm version prerelease --no-git-tag-version --preid ${{ env.branch }}.${{ env.sha_short }} - name: Publish run: sh scripts/publish-prerelease.sh env: