Skip to content

Commit

Permalink
👷 ci: 优化发布流程
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Feb 6, 2021
1 parent 2d02df5 commit 0e45c2d
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ jobs:
- name: Install
run: yarn

- name: Cache dependencies
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.os }}_deps
path: node_modules

- name: lint
run: yarn lint

Expand All @@ -65,8 +59,6 @@ jobs:
steps:
- uses: actions/checkout@v2

- run: yarn global add conventional-changelog-gitmoji-config

- name: Semantic Release with dryRun
uses: cycjimmy/semantic-release-action@v2
id: semantic
Expand All @@ -75,6 +67,7 @@ jobs:
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
conventional-changelog-gitmoji-config
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -93,11 +86,11 @@ jobs:
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Download dependencies
uses: actions/download-artifact@v2
- name: Yarn cache
uses: actions/cache@v2
with:
name: ${{ matrix.os }}_deps
path: node_modules
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}

- name: Tricky version
run: npx npe version ${{ needs.check.outputs.version }}
Expand Down Expand Up @@ -177,13 +170,12 @@ jobs:
- name: List artifact
run: ls -al release

- run: yarn global add conventional-changelog-gitmoji-config

- name: Release
uses: cycjimmy/semantic-release-action@v2
with:
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
conventional-changelog-gitmoji-config
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 0e45c2d

Please sign in to comment.