@vixoniccom/aqi 0.0.3-dev.2 → 0.0.3-dev.4

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