Skip to content

Commit e2749f9

Browse files
committed
chore: fix a bug whereby gh release was using a wrong tag
1 parent bbfce9d commit e2749f9

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,11 +284,12 @@ jobs:
284284
- name: Create Github Release
285285
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1
286286
with:
287-
tag_name: v${{ steps.tag.outputs.tag }}
287+
tag_name: v${{ steps.tag.outputs.version }}
288288
body: ${{ steps.extract_release_notes.outputs.release_notes }}
289289
prerelease: ${{ needs.state.outputs.is_prerelease }}
290290
env:
291291
GITHUB_TOKEN: ${{ steps.gh-app-token.outputs.token }}
292+
TAG_NAME:
292293

293294
- name: Publish Job Slack Notification
294295
uses: act10ns/slack@44541246747a30eb3102d87f7a4cc5471b0ffb7d # v2.1.0

scripts/tag.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@ dist_tag() {
1212
elif npx semver -r ">$LATEST_NPM_VERSION" "$PACKAGE_JSON_VERSION" > /dev/null; then
1313
echo "latest"
1414
else
15-
# This is a patch for an older version
16-
# npm can't publish without a tag
1715
echo "tmp"
1816
fi
1917
}
2018

19+
gh_tag() {
20+
jq -r .version package.json
21+
}
22+
2123
echo "tag=$(dist_tag)" >> $GITHUB_OUTPUT
24+
echo "version=$(gh_tag)" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)