apply script change

This commit is contained in:
pengfei.zhou 2020-03-25 16:04:22 +08:00 committed by osborn
parent 65906b6c02
commit 5df53369a0
3 changed files with 23 additions and 5 deletions

View File

@ -1,8 +1,8 @@
name: Publish SDK name: Release
on: on:
push: push:
tags: tags:
- '*.*.*' - 'v*.*.*'
jobs: jobs:
build: build:
runs-on: macos-latest runs-on: macos-latest
@ -16,6 +16,14 @@ jobs:
with: with:
node-version: 10 node-version: 10
registry-url: 'https://registry.npmjs.org' registry-url: 'https://registry.npmjs.org'
- name: Config Github Account
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.email "pengfeizhou@foxmail.com"
git config user.name "pengfei.zhou"
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
git checkout master
- name: Setup - name: Setup
run: sh setup.sh run: sh setup.sh
- name: Install Cocoapods - name: Install Cocoapods
@ -23,8 +31,8 @@ jobs:
gem install cocoapods gem install cocoapods
- name: Echo current Version - name: Echo current Version
run: | run: |
echo ${GITHUB_REF:10}>version echo ${GITHUB_REF:11}>version
echo "Current Version is "${GITHUB_REF:10} echo "Current Version is "${GITHUB_REF:11}
- name: Publish - name: Publish
run: | run: |
sh publish.sh sh publish.sh

View File

@ -21,3 +21,5 @@ git tag "$CURRENT_VERSION"_legacy
echo "Publish Android" echo "Publish Android"
cd $CURRENT_DIR/doric-android && ./gradlew clean publishAll cd $CURRENT_DIR/doric-android && ./gradlew clean publishAll
git push --tags

View File

@ -35,6 +35,14 @@ echo $CURRENT_VERSION > $CURRENT_DIR/doric-cli/target/version
cd $CURRENT_DIR/ cd $CURRENT_DIR/
echo "Commit changes" echo "Commit changes"
git add .
git commit -m "Release v${CURRENT_VERSION}"
git tag ${CURRENT_VERSION}
git push
git push --tags
echo "Publish JS" echo "Publish JS"
cd $CURRENT_DIR/doric-js && npm publish cd $CURRENT_DIR/doric-js && npm publish