@questwork/vue-q-widget-vue3 3.1.19 → 3.1.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.
@@ -0,0 +1,60 @@
1
+ name: Publish to npm on Tag
2
+ on:
3
+ push:
4
+ tags:
5
+ - 'v*'
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ publish:
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ contents: read
13
+ id-token: write # OIDC
14
+ # environment: production
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+ with:
18
+ fetch-depth: 0 # Needed to get tag information
19
+
20
+ - name: Install pnpm
21
+ uses: pnpm/action-setup@v4
22
+ with:
23
+ version: 9
24
+
25
+ - uses: actions/setup-node@v4
26
+ with:
27
+ node-version: 20.x
28
+ registry-url: https://registry.npmjs.org/
29
+ cache: pnpm
30
+
31
+ - name: Install dependencies
32
+ run: pnpm install
33
+
34
+ - name: Build
35
+ run: |
36
+ BUILD_COMMAND=$(node -p "(require('./package.json').scripts || {}).build")
37
+ if [ "$BUILD_COMMAND" = "undefined" ]; then
38
+ echo "::notice::Can't find a build script in package.json, skip."
39
+ else
40
+ pnpm run build
41
+ fi
42
+
43
+ # - name: Publish to npm
44
+ # # if: steps.version-check.outputs.should_publish == 'true'
45
+ # run: pnpm publish --no-git-checks --access public
46
+ # env:
47
+ # NODE_AUTH_TOKEN: ${{ secrets.QW_NPM_TOKEN }}
48
+
49
+ - name: Update npm
50
+ run: |
51
+ NPM_VERSION=$(npm -v)
52
+ echo "Current npm version: $NPM_VERSION"
53
+ if ! npx semver -r ">=11.5.1" "$NPM_VERSION"; then
54
+ echo "npm version $NPM_VERSION is too old. Installing latest npm..."
55
+ npm install -g npm@latest
56
+ echo "Updated npm version: $(npm -v)"
57
+ fi
58
+
59
+ - name: Publish to npm
60
+ run: npm publish --no-git-checks --access public