Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mantou132 committed Sep 10, 2024
1 parent 371e2f5 commit f7f1ac2
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 24 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/duoyun-ui-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@ jobs:
duoyun-ui-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 22.x

- run: pnpm install
- name: Setup pnpm
uses: pnpm/action-setup@v3 # docs https://pnpm.io/continuous-integration#github-actions
with:
version: 9 # Optional: specify a pnpm version
run_install: true

- uses: JS-DevTools/npm-publish@v1
with:
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/gem-analyzer-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@ jobs:
gem-analyzer-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 22.x

- run: pnpm install
- name: Setup pnpm
uses: pnpm/action-setup@v3 # docs https://pnpm.io/continuous-integration#github-actions
with:
version: 9 # Optional: specify a pnpm version
run_install: true

- uses: JS-DevTools/npm-publish@v1
with:
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/gem-book-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@ jobs:
gem-book-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 22.x

- run: pnpm install
- name: Setup pnpm
uses: pnpm/action-setup@v3 # docs https://pnpm.io/continuous-integration#github-actions
with:
version: 9 # Optional: specify a pnpm version
run_install: true

- uses: JS-DevTools/npm-publish@v1
with:
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/gem-devtools-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@ jobs:
gem-devtools-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 22.x

- run: pnpm install
- name: Setup pnpm
uses: pnpm/action-setup@v3 # docs https://pnpm.io/continuous-integration#github-actions
with:
version: 9 # Optional: specify a pnpm version
run_install: true

- name: Build
run: |
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/gem-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,26 @@ name: Publish Gem
on:
push:
tags:
- '@mantou/gem@*'
- "@mantou/gem@*"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
gem-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 22.x

- name: Setup pnpm
uses: pnpm/action-setup@v3 # docs https://pnpm.io/continuous-integration#github-actions
with:
version: 9 # Optional: specify a pnpm version
run_install: false

- run: node -e "fs.writeFileSync('./packages/gem/src/lib/version.ts', 'export const version = \'' + require('./packages/gem/package.json').version + '\';\n')"
- run: pnpm install
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,18 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 22.x

- name: Setup pnpm
uses: pnpm/action-setup@v3 # docs https://pnpm.io/continuous-integration#github-actions
with:
version: 9 # Optional: specify a pnpm version
run_install: true

- run: pnpm install
- run: pnpm lint
- run: pnpm test
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ Create custom elements, bind data, route switching, and quickly develop WebApps
| [packages/gem-port](packages/gem-port) | Export Gem elements as React/Vue/Svelte components |
| [packages/gem-examples](packages/gem-examples) | Gem and DuoyunUI examples |

[Rodmap](https://mm.tt/app/map/3412316197?t=TGs84FRcwQ).

## Contribution

Fork repo, submit PR
2 changes: 2 additions & 0 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
| [packages/gem-port](packages/gem-port) | 将 Gem 元素导出为 React/Vue/Svelte 组件 |
| [packages/gem-examples](packages/gem-examples) | 一些 Gem 和 DuoyunUI 示例 |

[路线图](https://mm.tt/app/map/3412316197?t=TGs84FRcwQ)

## 贡献

Fork 项目,提交 PR

0 comments on commit f7f1ac2

Please sign in to comment.