Skip to content

Commit

Permalink
ci: update auto release
Browse files Browse the repository at this point in the history
  • Loading branch information
fanhaoyuan committed Sep 30, 2021
1 parent 8c7dc8d commit d26cd49
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 38 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/react-vant-weapp-typings-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: React Vant Weapp Typings Release

on:
push:
tags:
- 'react-vant-weapp-typings/v*'

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Create GitHub release
uses: Roang-zero1/github-create-release-action@master
with:
version_regex: ^react-vant-weapp-typings/v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
39 changes: 1 addition & 38 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release
on:
push:
tags:
- '*'
- 'v*'

jobs:
release:
Expand All @@ -15,40 +15,3 @@ jobs:
version_regex: ^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

- name: Git Checkout
uses: actions/checkout@v2
with:
ref: master

#安装node环境
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: '12'

- name: Set Dependencies Cache
uses: actions/cache@v2
id: yarn-cache
with:
path: '**/node_modules/**/*'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- name: Install Dependencies
uses: borales/actions-yarn@v2.3.0
if: steps.yarn-cache.outputs.cache-hit != 'true'
with:
cmd: install

- name: Build
run: npm run build

- name: Set .npmrc file
run: echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc

- name: Publish
run: npm publish
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}

0 comments on commit d26cd49

Please sign in to comment.