Skip to content

Commit

Permalink
Merge pull request #27 from alovajs/release/v1.1.x
Browse files Browse the repository at this point in the history
ci: optimize github action file
  • Loading branch information
JOU-amjs authored Jul 4, 2023
2 parents 0eb62dc + f943c9e commit b9dfdb2
Showing 1 changed file with 68 additions and 2 deletions.
70 changes: 68 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
if: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/alpha' && github.ref != 'refs/heads/beta' }}
run: npm run test

release:
coverage:
runs-on: ubuntu-latest
needs: [quality]
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/alpha' || github.ref == 'refs/heads/beta' }}
Expand All @@ -61,8 +61,74 @@ jobs:
- name: Coverage
run: npm run coveralls

release-react:
runs-on: ubuntu-latest
needs: [coverage]
steps:
# 拉取代码
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.12.x
registry-url: 'https://registry.npmjs.org'
cache: 'npm'

# 执行测试和打包操作
- name: Install deps
run: npm ci

- name: Release
run: npm run release --workspace @alova/scene-react
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ALOVA_PUBLISH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

release-vue:
runs-on: ubuntu-latest
needs: [coverage]
steps:
# 拉取代码
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.12.x
registry-url: 'https://registry.npmjs.org'
cache: 'npm'

# 执行测试和打包操作
- name: Install deps
run: npm ci

- name: Release
run: npm run release --workspace @alova/scene-vue
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ALOVA_PUBLISH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

release-svelte:
runs-on: ubuntu-latest
needs: [coverage]
steps:
# 拉取代码
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.12.x
registry-url: 'https://registry.npmjs.org'
cache: 'npm'

# 执行测试和打包操作
- name: Install deps
run: npm ci

- name: Release
run: npm run release --workspaces
run: npm run release --workspace @alova/scene-svelte
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ALOVA_PUBLISH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit b9dfdb2

Please sign in to comment.