Skip to content

Commit c592c10

Browse files
publish lowcoder-core workflow
1 parent 04b61f2 commit c592c10

File tree

2 files changed

+48
-1
lines changed

2 files changed

+48
-1
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2+
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3+
4+
name: Publish Lowcoder SDK
5+
6+
on:
7+
push:
8+
branches: [ "publish-comps-workflow" ]
9+
10+
jobs:
11+
publish-package:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v3
16+
17+
- name: Check version changes
18+
uses: EndBug/version-check@v1
19+
id: check
20+
with:
21+
diff-search: true
22+
file-name: client/packages/lowcoder-sdk/package.json
23+
24+
- name: Version update detected
25+
if: steps.check.outputs.changed == 'true'
26+
run: 'echo "Version change found! New version: ${{ steps.check.outputs.version }} (${{ steps.check.outputs.type }})"'
27+
28+
- name: Set up Node.js for NPM
29+
if: steps.check.outputs.changed == 'true'
30+
uses: actions/setup-node@v3
31+
with:
32+
node-version: 16
33+
registry-url: https://registry.npmjs.org/
34+
35+
- name: Install dependencies
36+
if: steps.check.outputs.changed == 'true'
37+
uses: borales/actions-yarn@v4.2.0
38+
with:
39+
cmd: install
40+
dir: client/packages/lowcoder-sdk
41+
42+
- name: Publish package to NPM
43+
if: steps.check.outputs.changed == 'true'
44+
run: npm publish
45+
working-directory: client/packages/lowcoder-sdk
46+
env:
47+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

client/packages/lowcoder-sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lowcoder-sdk",
3-
"version": "2.1.10",
3+
"version": "2.1.11",
44
"type": "module",
55
"files": [
66
"src",

0 commit comments

Comments
 (0)