@vixoniccom/birthdays 0.7.5-dev.5 → 0.7.6
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 +0 -7
- package/.github/workflows/release.yml +126 -0
- package/CHANGELOG.md +15 -0
- package/build.zip +0 -0
- package/package.json +1 -1
|
@@ -5,16 +5,9 @@ on:
|
|
|
5
5
|
branches:
|
|
6
6
|
- master
|
|
7
7
|
- main
|
|
8
|
-
pull_request:
|
|
9
|
-
branches:
|
|
10
|
-
- master
|
|
11
|
-
- main
|
|
12
|
-
types: [closed]
|
|
13
8
|
|
|
14
9
|
jobs:
|
|
15
10
|
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
11
|
runs-on: ubuntu-latest
|
|
19
12
|
|
|
20
13
|
steps:
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
name: Publish to NPM
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- master
|
|
8
|
+
- main
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
publish:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
permissions:
|
|
14
|
+
contents: write
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- name: Checkout code
|
|
18
|
+
uses: actions/checkout@v4
|
|
19
|
+
with:
|
|
20
|
+
fetch-depth: 0
|
|
21
|
+
|
|
22
|
+
- name: Configure git
|
|
23
|
+
run: |
|
|
24
|
+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
|
25
|
+
git config --global user.name "github-actions[bot]"
|
|
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@v4
|
|
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: Check if version is pre-release
|
|
54
|
+
id: check-prerelease
|
|
55
|
+
run: |
|
|
56
|
+
PACKAGE_VERSION=$(node -p "require('./package.json').version")
|
|
57
|
+
echo "Current version: $PACKAGE_VERSION"
|
|
58
|
+
|
|
59
|
+
if [[ "$PACKAGE_VERSION" =~ -(dev|beta|alpha|rc|canary|next|preview|snapshot|nightly)\.[0-9]+ ]]; then
|
|
60
|
+
echo "is-prerelease=true" >> $GITHUB_OUTPUT
|
|
61
|
+
echo "✅ Version $PACKAGE_VERSION is a pre-release - will run npm run release"
|
|
62
|
+
else
|
|
63
|
+
echo "is-prerelease=false" >> $GITHUB_OUTPUT
|
|
64
|
+
echo "✅ Version $PACKAGE_VERSION is already a production version - skipping npm run release"
|
|
65
|
+
fi
|
|
66
|
+
|
|
67
|
+
- name: Bump version to production (only if pre-release)
|
|
68
|
+
if: steps.check-prerelease.outputs.is-prerelease == 'true'
|
|
69
|
+
run: |
|
|
70
|
+
echo "🔄 Converting pre-release to production version..."
|
|
71
|
+
npm run release
|
|
72
|
+
git push --follow-tags origin ${{ github.ref_name }}
|
|
73
|
+
env:
|
|
74
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
75
|
+
|
|
76
|
+
- name: Build package
|
|
77
|
+
run: npm run prepublish
|
|
78
|
+
env:
|
|
79
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
80
|
+
|
|
81
|
+
- name: Verify build.zip exists
|
|
82
|
+
run: |
|
|
83
|
+
if [ ! -f "build.zip" ]; then
|
|
84
|
+
echo "❌ Error: build.zip not found after build process"
|
|
85
|
+
exit 1
|
|
86
|
+
fi
|
|
87
|
+
echo "✅ build.zip found successfully"
|
|
88
|
+
ls -la build.zip
|
|
89
|
+
|
|
90
|
+
- name: Check if version already exists on npm
|
|
91
|
+
id: check-version
|
|
92
|
+
run: |
|
|
93
|
+
PACKAGE_NAME=$(node -p "require('./package.json').name")
|
|
94
|
+
PACKAGE_VERSION=$(node -p "require('./package.json').version")
|
|
95
|
+
|
|
96
|
+
echo "Checking if $PACKAGE_NAME@$PACKAGE_VERSION exists on npm..."
|
|
97
|
+
|
|
98
|
+
if npm view "$PACKAGE_NAME@$PACKAGE_VERSION" version 2>/dev/null; then
|
|
99
|
+
echo "version-exists=true" >> $GITHUB_OUTPUT
|
|
100
|
+
echo "⚠️ Version $PACKAGE_VERSION already exists on npm"
|
|
101
|
+
else
|
|
102
|
+
echo "version-exists=false" >> $GITHUB_OUTPUT
|
|
103
|
+
echo "✅ Version $PACKAGE_VERSION does not exist on npm - ready to publish"
|
|
104
|
+
fi
|
|
105
|
+
|
|
106
|
+
- name: Publish to npm
|
|
107
|
+
if: steps.check-version.outputs.version-exists == 'false'
|
|
108
|
+
run: |
|
|
109
|
+
echo "Publishing to npm..."
|
|
110
|
+
npm publish --access public
|
|
111
|
+
env:
|
|
112
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
113
|
+
|
|
114
|
+
- name: Publication success
|
|
115
|
+
if: steps.check-version.outputs.version-exists == 'false'
|
|
116
|
+
run: |
|
|
117
|
+
PACKAGE_NAME=$(node -p "require('./package.json').name")
|
|
118
|
+
PACKAGE_VERSION=$(node -p "require('./package.json').version")
|
|
119
|
+
echo "🎉 Successfully published $PACKAGE_NAME@$PACKAGE_VERSION to npm!"
|
|
120
|
+
echo "📦 Package includes build.zip with the compiled application"
|
|
121
|
+
|
|
122
|
+
- name: Skip publication - version exists
|
|
123
|
+
if: steps.check-version.outputs.version-exists == 'true'
|
|
124
|
+
run: |
|
|
125
|
+
PACKAGE_VERSION=$(node -p "require('./package.json').version")
|
|
126
|
+
echo "⏭️ Skipping publication - version $PACKAGE_VERSION already exists on npm"
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
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.6](https://github.com/Vixonic/store-birthdays/compare/v0.7.5...v0.7.6) (2026-01-15)
|
|
6
|
+
|
|
7
|
+
### [0.7.5](https://github.com/Vixonic/store-birthdays/compare/v0.7.5-dev.5...v0.7.5) (2026-01-15)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* Add GitHub Actions workflow for publishing to NPM ([95027cb](https://github.com/Vixonic/store-birthdays/commit/95027cbc0b7fea9b1e78e68b326b17fa55e1c830))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* github action to publish npm package is just trigger in master/main branch now ([0566182](https://github.com/Vixonic/store-birthdays/commit/05661821b07a69c6cb3a4d4bedfe294d83116b78))
|
|
18
|
+
* pipeline to deploy ([9779fcf](https://github.com/Vixonic/store-birthdays/commit/9779fcfa554b8cc9e6fa6ee9ccb558db96b7533c))
|
|
19
|
+
|
|
5
20
|
### [0.7.5-dev.5](https://github.com/Vixonic/store-birthdays/compare/v0.7.5-dev.4...v0.7.5-dev.5) (2026-01-09)
|
|
6
21
|
|
|
7
22
|
### [0.7.5-dev.4](https://github.com/Vixonic/store-birthdays/compare/v0.7.5-dev.2...v0.7.5-dev.4) (2026-01-09)
|
package/build.zip
CHANGED
|
Binary file
|