Skip to content

Commit 2c1e654

Browse files
committed
feat: update version to 8.3.0 and add version check before publishing
1 parent 52277a1 commit 2c1e654

3 files changed

Lines changed: 14 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,22 @@ jobs:
6767

6868
- name: Get new version
6969
id: version
70-
run: echo "value=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
70+
run: |
71+
VERSION=$(node -p "require('./package.json').version")
72+
echo "value=$VERSION" >> $GITHUB_OUTPUT
73+
echo "Bumped to $VERSION"
7174
7275
- name: Build
7376
run: npm run build
7477

78+
- name: Check version not already published
79+
run: |
80+
VERSION="${{ steps.version.outputs.value }}"
81+
if npm view react-data-table-component@$VERSION version 2>/dev/null; then
82+
echo "Error: v$VERSION is already published to npm"
83+
exit 1
84+
fi
85+
7586
- name: Publish to npm
7687
run: npm publish --provenance --access public --ignore-scripts
7788

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-data-table-component",
3-
"version": "8.2.0",
3+
"version": "8.3.0",
44
"description": "A fast, feature-rich React data table. Working table in 10 lines.",
55
"main": "dist/index.js",
66
"module": "dist/index.mjs",

0 commit comments

Comments
 (0)