@tossplace/pos-plugin-sdk 0.0.9 → 0.0.11
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/release.yml +54 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/sdk.d.ts +49 -3
- package/package.json +1 -1
- package/types/index.d.ts +49 -3
|
@@ -15,6 +15,8 @@ jobs:
|
|
|
15
15
|
publish-npm:
|
|
16
16
|
if: github.event.pull_request.merged == true
|
|
17
17
|
runs-on: ubuntu-latest
|
|
18
|
+
outputs:
|
|
19
|
+
version_type: ${{ steps.get-version-type.outputs.VERSION_TYPE }}
|
|
18
20
|
steps:
|
|
19
21
|
- uses: actions/checkout@v3
|
|
20
22
|
with:
|
|
@@ -75,3 +77,55 @@ jobs:
|
|
|
75
77
|
fi
|
|
76
78
|
env:
|
|
77
79
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
80
|
+
|
|
81
|
+
update-template-repo:
|
|
82
|
+
needs: publish-npm
|
|
83
|
+
if: github.event.pull_request.merged == true && needs.publish-npm.outputs.version_type != ''
|
|
84
|
+
runs-on: ubuntu-latest
|
|
85
|
+
steps:
|
|
86
|
+
- name: Checkout toss-pos-plugin-template repository
|
|
87
|
+
uses: actions/checkout@v3
|
|
88
|
+
with:
|
|
89
|
+
repository: tossplace/toss-pos-plugin-template
|
|
90
|
+
token: ${{ secrets.TEMPLATE_REPO_ACCESS_TOKEN }}
|
|
91
|
+
|
|
92
|
+
- name: Setup Node.js
|
|
93
|
+
uses: actions/setup-node@v5
|
|
94
|
+
with:
|
|
95
|
+
node-version: "24"
|
|
96
|
+
|
|
97
|
+
- name: Configure Git
|
|
98
|
+
run: |
|
|
99
|
+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
|
100
|
+
git config --local user.name "github-actions[bot]"
|
|
101
|
+
|
|
102
|
+
- name: Update package versions in template
|
|
103
|
+
run: |
|
|
104
|
+
for dir in iframe-plugin-ts iframe-plugin-js worker-plugin-ts worker-plugin-js; do
|
|
105
|
+
echo "--- Updating dependencies in $dir ---"
|
|
106
|
+
(
|
|
107
|
+
cd "./$dir"
|
|
108
|
+
npm install @tossplace/pos-plugin-sdk@latest
|
|
109
|
+
if [[ "$dir" == worker-plugin-* ]]; then
|
|
110
|
+
npm install --save-dev @tossplace/pos-plugin-test@latest
|
|
111
|
+
fi
|
|
112
|
+
)
|
|
113
|
+
done
|
|
114
|
+
|
|
115
|
+
- name: Commit and push package update
|
|
116
|
+
run: |
|
|
117
|
+
PACKAGE_LOCKS=$(git ls-files '*package-lock.json')
|
|
118
|
+
if [ -n "$PACKAGE_LOCKS" ]; then
|
|
119
|
+
git checkout -- $PACKAGE_LOCKS
|
|
120
|
+
fi
|
|
121
|
+
for dir in iframe-plugin-ts iframe-plugin-js worker-plugin-ts worker-plugin-js; do
|
|
122
|
+
if [ -f "./$dir/package.json" ]; then
|
|
123
|
+
git add "./$dir/package.json"
|
|
124
|
+
fi
|
|
125
|
+
done
|
|
126
|
+
if git diff --cached --quiet; then
|
|
127
|
+
echo "No package.json changes to commit."
|
|
128
|
+
exit 0
|
|
129
|
+
fi
|
|
130
|
+
git commit -m "chore: version up"
|
|
131
|
+
git push
|