Skip to content

Commit 54786b8

Browse files
publish comps workflow
1 parent b4a9873 commit 54786b8

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/publish-comps.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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 Comps
5+
6+
on:
7+
push:
8+
branches: [ "publish-comps-workflow" ]
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 0
17+
- uses: actions/setup-node@v3
18+
- name: Install dependencies
19+
uses: borales/actions-yarn@v4.2.0
20+
with:
21+
cmd: install
22+
dir: client/packages/lowcoder-comps
23+
- name: Run tests
24+
uses: borales/actions-yarn@v4.2.0
25+
with:
26+
cmd: test
27+
dir: client/packages/lowcoder-comps
28+
29+
publish-package:
30+
needs: build
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v3
34+
- uses: actions/setup-node@v3
35+
with:
36+
node-version: 16
37+
registry-url: https://registry.npmjs.org/
38+
- run: cat .npmrc
39+
- run: echo ${{ secrets.NPM_TOKEN }}
40+
- name: Install dependencies
41+
uses: borales/actions-yarn@v4.2.0
42+
with:
43+
cmd: install
44+
dir: client/packages/lowcoder-comps
45+
- name: Publish
46+
uses: borales/actions-yarn@v4.2.0
47+
with:
48+
cmd: build_publish
49+
dir: client/packages/lowcoder-comps
50+
env:
51+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 commit comments

Comments
 (0)