Skip to content

Commit

Permalink
feat: action
Browse files Browse the repository at this point in the history
  • Loading branch information
xsf0105 committed Jun 8, 2023
1 parent 38cb40f commit fe563dd
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,13 @@ jobs:
with:
fetch-depth: 1

- name: Get yarn cache
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Cache dependencies
uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 16

# 打包
- run: npm install
- run: npm run build

# 根据commit关键词触发publish的版本 https://github.com/phips28/gh-action-bump-version#workflow
Expand All @@ -46,11 +34,9 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GIT_ACTION }}
with:
patch-wording: 'patch,fix' # Providing patch-wording will override commits
patch-wording: 'fix' # Providing patch-wording will override commits
minor-wording: 'feat'
major-wording: 'BC'
# defaulting to a patch bump.
rc-wording: 'RELEASE,alpha'
major-wording: 'BREAK CHANGE'

- name: Publish to NPM
run: npm publish || true
Expand Down

0 comments on commit fe563dd

Please sign in to comment.