Skip to content

Commit

Permalink
update workflow (#30)
Browse files Browse the repository at this point in the history
* update workflow

Signed-off-by: zxypro1 <[email protected]>

* update workflow

Signed-off-by: zxypro1 <[email protected]>

* update workflow

Signed-off-by: zxypro1 <[email protected]>

* update workflow

Signed-off-by: zxypro1 <[email protected]>

* update workflow

Signed-off-by: zxypro1 <[email protected]>

* update workflow

Signed-off-by: zxypro1 <[email protected]>

* update readme

Signed-off-by: zxypro1 <[email protected]>

---------

Signed-off-by: zxypro1 <[email protected]>
  • Loading branch information
zxypro1 authored Feb 1, 2024
1 parent 250d596 commit d725d13
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 48 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: CI

on:
pull_request:
branches:
- main
paths-ignore:
- '**/**.md'

jobs:
build-and-test:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node-version: [16.x, 20.x]

steps:
- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Install pnpm
run: npm install -g pnpm

- name: Install dependencies
run: npm run install:all

- name: Build
run: npm run build

- name: export env
if: matrix.os != 'windows-latest'
run: |
export AccountID=123
export AccessKeyID=123
export AccessKeySecret=123
export region=cn-chengdu
export desc=this_is_a_desc
- name: export env windows
if: matrix.os == 'windows-latest'
run: |
$env:AccountID=123
$env:AccessKeyID=123
$env:AccessKeySecret=123
$env:region="cn-chengdu"
$env:desc="this_is_a_desc"
- name: Run tests
run: npm run ci
47 changes: 0 additions & 47 deletions .github/workflows/publish-beta.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/publish-pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
node-version: '18'

- name: Install pnpm
run: npm install -g pnpm
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ npm run test #测试

## 发布

### 本地beta发布测试

- 修改package.json中的版本号,格式为`x.x.x-beta.x(如0.0.1-beta.1)`
- 使用`npm publish --tag=beta`发布到npm。

### 发布到npm

- 修改package.json中的版本号。
Expand Down

0 comments on commit d725d13

Please sign in to comment.