@vaneui/ui 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,65 @@
1
+ # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2
+ # For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3
+
4
+ name: Npm publish on push
5
+
6
+ on: [push]
7
+
8
+ jobs:
9
+ build:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - name: Checkout Code
13
+ uses: actions/checkout@v4
14
+
15
+ - name: Setup Node.js
16
+ uses: actions/setup-node@v3
17
+ with:
18
+ node-version: '20'
19
+ registry-url: 'https://registry.npmjs.org'
20
+ cache: 'npm'
21
+
22
+ - name: Install Dependencies
23
+ run: npm ci
24
+
25
+ - name: Build Package
26
+ run: npm run build
27
+
28
+ publish-npm:
29
+ needs: build
30
+ runs-on: ubuntu-latest
31
+ steps:
32
+ - name: Checkout Code
33
+ uses: actions/checkout@v4
34
+
35
+ - name: Setup Node.js
36
+ uses: actions/setup-node@v3
37
+ with:
38
+ node-version: '20'
39
+ registry-url: 'https://registry.npmjs.org'
40
+
41
+ - name: Install Dependencies
42
+ run: npm ci
43
+
44
+ - name: Check if Version Already Published
45
+ id: check_version
46
+ run: |
47
+ # Get version from package.json
48
+ VERSION=$(node -p "require('./package.json').version")
49
+ echo "Local package version: $VERSION"
50
+ # Get published version for the package (@vaneui/ui) or "none" if not published.
51
+ PUBLISHED_VERSION=$(npm view @vaneui/ui version || echo "none")
52
+ echo "Published package version: $PUBLISHED_VERSION"
53
+ if [ "$VERSION" = "$PUBLISHED_VERSION" ]; then
54
+ echo "Version already published. Skipping publish step."
55
+ echo "shouldPublish=false" >> $GITHUB_OUTPUT
56
+ else
57
+ echo "Version is new. Proceeding with publish."
58
+ echo "shouldPublish=true" >> $GITHUB_OUTPUT
59
+ fi
60
+
61
+ - name: Publish Package to npm
62
+ if: steps.check_version.outputs.shouldPublish == 'true'
63
+ run: npm publish --access public
64
+ env:
65
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
package/README.md CHANGED
@@ -1 +1,4 @@
1
- # vaneui
1
+ [![npm version](https://img.shields.io/npm/v/%40vaneui/ui.svg?style=flat)](https://www.npmjs.com/package/%40vaneui/ui)
2
+
3
+
4
+ # vaneui