@questwork/q-store-model 0.1.35 → 0.1.38
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/publish.yml +46 -0
- package/dist/index.min.cjs +1060 -641
- package/dist/q-store-model.min.js +1060 -641
- package/package.json +6 -10
- package/dist/index.min.js +0 -6960
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
name: Publish to npm on Tag
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
tags:
|
|
5
|
+
- 'v*'
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
jobs:
|
|
8
|
+
publish:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
packages: write
|
|
13
|
+
# environment: production
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
with:
|
|
17
|
+
fetch-depth: 0 # Needed to get tag information
|
|
18
|
+
|
|
19
|
+
- name: Install pnpm
|
|
20
|
+
uses: pnpm/action-setup@v4
|
|
21
|
+
with:
|
|
22
|
+
version: 9
|
|
23
|
+
|
|
24
|
+
- uses: actions/setup-node@v4
|
|
25
|
+
with:
|
|
26
|
+
node-version: '20.x'
|
|
27
|
+
registry-url: https://registry.npmjs.org/
|
|
28
|
+
cache: 'pnpm'
|
|
29
|
+
|
|
30
|
+
- name: Install dependencies
|
|
31
|
+
run: pnpm install
|
|
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
|
+
|
|
42
|
+
- name: Publish to npm
|
|
43
|
+
# if: steps.version-check.outputs.should_publish == 'true'
|
|
44
|
+
run: pnpm publish --no-git-checks --access public
|
|
45
|
+
env:
|
|
46
|
+
NODE_AUTH_TOKEN: ${{ secrets.QW_NPM_TOKEN }}
|