Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update workflow #30

Merged
merged 7 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading