Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
huangbinjie committed Jan 10, 2025
1 parent 217a120 commit 2618c5b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
13 changes: 2 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,10 @@ jobs:

- name: Check if version changed
id: version_check
run: |
git fetch origin main
PREVIOUS_VERSION=$(git show origin/main:package.json | jq -r .version)
CURRENT_VERSION=$(jq -r .version package.json)
echo "previous_version=$PREVIOUS_VERSION" >> $GITHUB_OUTPUT
echo "current_version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
if [ "$PREVIOUS_VERSION" == "$CURRENT_VERSION" ]; then
echo "Version has not changed. Exiting."
exit 0
fi
uses: EndBug/version-check@v2

- name: Publish to npm
if: ${{ steps.version_check.outputs.current_version != steps.version_check.outputs.previous_version }}
if: steps.version_check.outputs.changed == 'true'
run: pnpm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "n6-ui",
"version": "1.2.5",
"version": "1.2.4",
"description": "N6 Network UI Framework",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -80,4 +80,4 @@
"tailwindcss": "^3.4.16",
"zustand": "^5.0.2"
}
}
}

0 comments on commit 2618c5b

Please sign in to comment.