@vixoniccom/news-internal 0.4.21-dev.9 → 0.4.22

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.
@@ -1,98 +0,0 @@
1
- name: Publish to NPM
2
-
3
- on:
4
- push:
5
- branches:
6
- - master
7
- - main
8
-
9
- jobs:
10
- publish:
11
- # Solo ejecutar si es un push a main/master
12
- if: github.event_name == 'push'
13
- runs-on: ubuntu-latest
14
-
15
- steps:
16
- - name: Checkout code
17
- uses: actions/checkout@v4
18
- with:
19
- fetch-depth: 0
20
-
21
- - name: Setup Node.js 20
22
- uses: actions/setup-node@v4
23
- with:
24
- node-version: '20'
25
- registry-url: 'https://registry.npmjs.org'
26
- scope: '@vixoniccom'
27
-
28
- - name: Configure npm authentication
29
- run: |
30
- echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
31
- echo "@vixoniccom:registry=https://registry.npmjs.org/" >> ~/.npmrc
32
- echo "registry=https://registry.npmjs.org/" >> ~/.npmrc
33
-
34
- - name: Cache node modules
35
- uses: actions/cache@v4
36
- with:
37
- path: ~/.npm
38
- key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
39
- restore-keys: |
40
- ${{ runner.os }}-node-
41
-
42
- - name: Install dependencies
43
- run: npm ci
44
- env:
45
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
46
-
47
- - name: Build package
48
- run: npm run prepublish
49
- env:
50
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
51
-
52
- - name: Verify build.zip exists
53
- run: |
54
- if [ ! -f "build.zip" ]; then
55
- echo "❌ Error: build.zip not found after build process"
56
- exit 1
57
- fi
58
- echo "✅ build.zip found successfully"
59
- ls -la build.zip
60
-
61
- - name: Check if version already exists on npm
62
- id: check-version
63
- run: |
64
- PACKAGE_NAME=$(node -p "require('./package.json').name")
65
- PACKAGE_VERSION=$(node -p "require('./package.json').version")
66
-
67
- echo "Checking if $PACKAGE_NAME@$PACKAGE_VERSION exists on npm..."
68
-
69
- if npm view "$PACKAGE_NAME@$PACKAGE_VERSION" version 2>/dev/null; then
70
- echo "version-exists=true" >> $GITHUB_OUTPUT
71
- echo "⚠️ Version $PACKAGE_VERSION already exists on npm"
72
- else
73
- echo "version-exists=false" >> $GITHUB_OUTPUT
74
- echo "✅ Version $PACKAGE_VERSION does not exist on npm - ready to publish"
75
- fi
76
-
77
- - name: Publish to npm
78
- if: steps.check-version.outputs.version-exists == 'false'
79
- run: |
80
- echo "Publishing to npm..."
81
- npm publish --access public
82
- env:
83
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
84
-
85
- - name: Publication success
86
- if: steps.check-version.outputs.version-exists == 'false'
87
- run: |
88
- PACKAGE_NAME=$(node -p "require('./package.json').name")
89
- PACKAGE_VERSION=$(node -p "require('./package.json').version")
90
- echo "🎉 Successfully published $PACKAGE_NAME@$PACKAGE_VERSION to npm!"
91
- echo "📦 Package includes build.zip with the compiled application"
92
-
93
- - name: Skip publication
94
- if: steps.check-version.outputs.version-exists == 'true'
95
- run: |
96
- PACKAGE_VERSION=$(node -p "require('./package.json').version")
97
- echo "⏭️ Skipping publication - version $PACKAGE_VERSION already exists on npm"
98
- echo "💡 To publish a new version, update the version in package.json or run 'npm run release'"