Skip to content

Commit e7570f3

Browse files
committed
fix publish script
1 parent cb46b79 commit e7570f3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/release-feature-branch.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,10 @@ jobs:
344344
shell: bash
345345
run: |
346346
set -euxo pipefail
347-
version="$(tar -xOf ./artifacts/package.tgz package/package.json | jq -r .version)"
348-
tag="${GITHUB_REF_NAME}"
347+
old_version="$(jq -r .version package.json)"
348+
version="$old_version-$(git rev-parse --short HEAD)"
349+
npm version $version
350+
tag="${{ github.ref_name }}"
349351
is_published="$(npm view ${{ matrix.package }} versions --json | jq -r '.[] | select(. == "'$version'") | . == "'$version'"')"
350352
if [[ "$is_published" == "true" ]]; then
351353
echo "\`${{ matrix.package }}@$version\` already published, tagging \`$tag\`" >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)