@vixoniccom/birthdays 0.7.4-dev.9 → 0.7.5-dev.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.
- package/.github/workflows/npm-publish.yml +101 -0
- package/CHANGELOG.md +6 -0
- package/build.zip +0 -0
- package/package.json +1 -1
|
@@ -0,0 +1,101 @@
|
|
|
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
|
+
|
|
55
|
+
- name: Verify build.zip exists
|
|
56
|
+
run: |
|
|
57
|
+
if [ ! -f "build.zip" ]; then
|
|
58
|
+
echo "❌ Error: build.zip not found after build process"
|
|
59
|
+
exit 1
|
|
60
|
+
fi
|
|
61
|
+
echo "✅ build.zip found successfully"
|
|
62
|
+
ls -la build.zip
|
|
63
|
+
|
|
64
|
+
- name: Check if version already exists on npm
|
|
65
|
+
id: check-version
|
|
66
|
+
run: |
|
|
67
|
+
PACKAGE_NAME=$(node -p "require('./package.json').name")
|
|
68
|
+
PACKAGE_VERSION=$(node -p "require('./package.json').version")
|
|
69
|
+
|
|
70
|
+
echo "Checking if $PACKAGE_NAME@$PACKAGE_VERSION exists on npm..."
|
|
71
|
+
|
|
72
|
+
if npm view "$PACKAGE_NAME@$PACKAGE_VERSION" version 2>/dev/null; then
|
|
73
|
+
echo "version-exists=true" >> $GITHUB_OUTPUT
|
|
74
|
+
echo "⚠️ Version $PACKAGE_VERSION already exists on npm"
|
|
75
|
+
else
|
|
76
|
+
echo "version-exists=false" >> $GITHUB_OUTPUT
|
|
77
|
+
echo "✅ Version $PACKAGE_VERSION does not exist on npm - ready to publish"
|
|
78
|
+
fi
|
|
79
|
+
|
|
80
|
+
- name: Publish to npm
|
|
81
|
+
if: steps.check-version.outputs.version-exists == 'false'
|
|
82
|
+
run: |
|
|
83
|
+
echo "Publishing to npm..."
|
|
84
|
+
npm publish --access public
|
|
85
|
+
env:
|
|
86
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
87
|
+
|
|
88
|
+
- name: Publication success
|
|
89
|
+
if: steps.check-version.outputs.version-exists == 'false'
|
|
90
|
+
run: |
|
|
91
|
+
PACKAGE_NAME=$(node -p "require('./package.json').name")
|
|
92
|
+
PACKAGE_VERSION=$(node -p "require('./package.json').version")
|
|
93
|
+
echo "🎉 Successfully published $PACKAGE_NAME@$PACKAGE_VERSION to npm!"
|
|
94
|
+
echo "📦 Package includes build.zip with the compiled application"
|
|
95
|
+
|
|
96
|
+
- name: Skip publication
|
|
97
|
+
if: steps.check-version.outputs.version-exists == 'true'
|
|
98
|
+
run: |
|
|
99
|
+
PACKAGE_VERSION=$(node -p "require('./package.json').version")
|
|
100
|
+
echo "⏭️ Skipping publication - version $PACKAGE_VERSION already exists on npm"
|
|
101
|
+
echo "💡 To publish a new version, update the version in package.json or run 'npm run release'"
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
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.7.5-dev.0](https://github.com/Vixonic/store-birthdays/compare/v0.7.4...v0.7.5-dev.0) (2025-08-18)
|
|
6
|
+
|
|
7
|
+
### [0.7.4](https://github.com/Vixonic/store-birthdays/compare/v0.7.4-dev.10...v0.7.4) (2025-07-28)
|
|
8
|
+
|
|
9
|
+
### [0.7.4-dev.10](https://github.com/Vixonic/store-birthdays/compare/v0.7.4-dev.9...v0.7.4-dev.10) (2025-07-24)
|
|
10
|
+
|
|
5
11
|
### [0.7.4-dev.9](https://github.com/Vixonic/store-birthdays/compare/v0.7.4-dev.7...v0.7.4-dev.9) (2025-07-24)
|
|
6
12
|
|
|
7
13
|
### [0.7.4-dev.8](https://github.com/Vixonic/store-birthdays/compare/v0.7.4-dev.7...v0.7.4-dev.8) (2025-07-24)
|
package/build.zip
CHANGED
|
Binary file
|
package/package.json
CHANGED