@questwork/q-utilities 0.1.18 → 0.1.20

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.
@@ -15,7 +15,7 @@ jobs:
15
15
  - uses: actions/checkout@v4
16
16
  with:
17
17
  fetch-depth: 0 # Needed to get tag information
18
-
18
+
19
19
  - name: Install pnpm
20
20
  uses: pnpm/action-setup@v4
21
21
  with:
@@ -23,18 +23,24 @@ jobs:
23
23
 
24
24
  - uses: actions/setup-node@v4
25
25
  with:
26
- node-version: '20.x'
26
+ node-version: 20.x
27
27
  registry-url: https://registry.npmjs.org/
28
- cache: 'pnpm'
29
-
28
+ cache: pnpm
29
+
30
30
  - name: Install dependencies
31
31
  run: pnpm install
32
-
33
- # - name: Build
34
- # run: pnpm run build --if-present
35
-
32
+
33
+ - name: Build
34
+ run: |
35
+ BUILD_COMMAND=$(node -p "(require('./package.json').scripts || {}).build")
36
+ if [ "$BUILD_COMMAND" = "undefined" ]; then
37
+ echo "::notice::Can't find a build script in package.json, skip."
38
+ else
39
+ pnpm run build
40
+ fi
41
+
36
42
  - name: Publish to npm
37
43
  # if: steps.version-check.outputs.should_publish == 'true'
38
44
  run: pnpm publish --no-git-checks --access public
39
45
  env:
40
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
46
+ NODE_AUTH_TOKEN: ${{ secrets.QW_NPM_TOKEN }}