@nimbuslab/cli 0.14.0 → 0.16.0

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.
@@ -16,27 +16,52 @@ jobs:
16
16
  - name: Checkout
17
17
  uses: actions/checkout@v4
18
18
 
19
+ - name: Check if version changed
20
+ id: version_check
21
+ run: |
22
+ LOCAL_VERSION=$(node -p "require('./package.json').version")
23
+ NPM_VERSION=$(npm view @nimbuslab/cli version 2>/dev/null || echo "0.0.0")
24
+ echo "local=$LOCAL_VERSION" >> $GITHUB_OUTPUT
25
+ echo "npm=$NPM_VERSION" >> $GITHUB_OUTPUT
26
+ if [ "$LOCAL_VERSION" = "$NPM_VERSION" ]; then
27
+ echo "changed=false" >> $GITHUB_OUTPUT
28
+ echo "Versao $LOCAL_VERSION ja existe no npm. Pulando publish."
29
+ else
30
+ echo "changed=true" >> $GITHUB_OUTPUT
31
+ echo "Nova versao detectada: $NPM_VERSION -> $LOCAL_VERSION"
32
+ fi
33
+
19
34
  - name: Setup Bun
35
+ if: steps.version_check.outputs.changed == 'true'
20
36
  uses: oven-sh/setup-bun@v2
21
37
  with:
22
38
  bun-version: latest
23
39
 
24
40
  - name: Setup Node (for npm publish)
41
+ if: steps.version_check.outputs.changed == 'true'
25
42
  uses: actions/setup-node@v4
26
43
  with:
27
44
  node-version: "24"
28
45
  registry-url: "https://registry.npmjs.org"
29
46
 
30
47
  - name: Install dependencies
48
+ if: steps.version_check.outputs.changed == 'true'
31
49
  run: bun install
32
50
 
33
51
  - name: Typecheck
52
+ if: steps.version_check.outputs.changed == 'true'
34
53
  run: bun run typecheck
35
54
 
36
55
  - name: Build
56
+ if: steps.version_check.outputs.changed == 'true'
37
57
  run: bun run build
38
58
 
39
59
  - name: Publish to npm
60
+ if: steps.version_check.outputs.changed == 'true'
40
61
  run: npm publish --access public
41
62
  env:
42
63
  NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
64
+
65
+ - name: Skip message
66
+ if: steps.version_check.outputs.changed == 'false'
67
+ run: echo "Publish pulado - versao ${{ steps.version_check.outputs.local }} ja existe no npm"