-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* publish workflow Signed-off-by: zxypro1 <[email protected]> * update workflow feat: remove `project` in `env.yaml` Signed-off-by: zxypro1 <[email protected]> * publish: [email protected], [email protected] Signed-off-by: zxypro1 <[email protected]> --------- Signed-off-by: zxypro1 <[email protected]>
- Loading branch information
Showing
8 changed files
with
151 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Publish Packages | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'packages/*/package.json' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
package: | ||
- component-interface | ||
- component-manager | ||
- credential | ||
- diff | ||
- downloads | ||
- engine | ||
- ignore-walk | ||
- load-application | ||
- load-component | ||
- logger | ||
- orm | ||
- parse-spec | ||
- progress-bar | ||
- registry | ||
- utils | ||
- zip | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14' | ||
|
||
- name: Install dependencies | ||
run: npm run install:all | ||
|
||
- name: Build packages | ||
run: npm run build | ||
|
||
- name: Publish package | ||
run: | | ||
PACKAGE_DIR=packages/${{ matrix.package }} | ||
PACKAGE_JSON="${PACKAGE_DIR}/package.json" | ||
# 检查 package.json 是否被修改 | ||
if git diff HEAD^ HEAD --name-only | grep -q "${PACKAGE_JSON}"; then | ||
echo "Publishing ${{ matrix.package }}..." | ||
cd $PACKAGE_DIR | ||
npm run pub | ||
else | ||
echo "No changes in ${{ matrix.package }}/package.json" | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Release | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*@*' # 书写格式:[email protected] | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
|
||
- run: npx changelogithub # or [email protected] if ensure the stable result | ||
env: | ||
GITHUB_TOKEN: ${{secrets.CUSTOM_GITHUB_TOKEN}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,56 @@ | ||
# toolkit for serverless-devs | ||
|
||
## [@serverless-devs/downloads](./packages/downloads/README.md) | ||
![整体架构图](./assets/overall-arch.png) | ||
|
||
### [@serverless-devs/downloads](./packages/downloads/README.md) | ||
|
||
- 下载,支持文件解压等功能 | ||
## [@serverless-devs/load-application](./packages/load-application/README.md) | ||
- 下载应用, 仅适用于serverless源的应用。 | ||
|
||
### [@serverless-devs/load-application](./packages/load-application/README.md) | ||
|
||
- 下载应用, 仅适用于serverless源的应用。 | ||
|
||
### [@serverless-devs/engine](./packages/engine/README.md) | ||
|
||
- 核心,掌管所有第三方组件命令的具体执行。 | ||
|
||
### [@serverless-devs/parse-spec](./packages/parse-spec/README.md) | ||
|
||
- 配置文件解析,任务编排,处理后交由Engine执行。 | ||
|
||
### [@serverless-devs/logger](./packages/logger/README.md) | ||
|
||
- 掌管全局日志的输入和输出,读取和写入。 | ||
|
||
### [@serverless-devs/credential](./packages/credential/README.md) | ||
|
||
- 全局身份认证。 | ||
|
||
### [@serverless-devs/load-component](./packages/load-component/README.md) | ||
|
||
- 从下载源中下载特定组件。目前只保留了serverless registry源 | ||
|
||
### [@serverless-devs/registry](./packages/registry/README.md) | ||
|
||
- Serverless Registry内容管理 | ||
|
||
## 开发 | ||
|
||
```shell | ||
npm run install:all #依赖安装 | ||
npm run build #编译所有包 | ||
npm run test #测试 | ||
``` | ||
|
||
## 发布 | ||
|
||
### 发布到npm | ||
|
||
- 修改package.json中的版本号。 | ||
- 提pr到main。确保通过ci。 | ||
- 合并后,将触发流水线自动发布。 | ||
|
||
### Github Release | ||
|
||
- 打tag并上传,格式为`xxx(包名,如engine)@x.x.x(版本号,如0.0.1)`。 | ||
- 将自动触发流水线进行release。 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters