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