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:
push:
tags:
- '*.*.*'
- 'v*.*.*'
jobs:
build:
runs-on: macos-latest
@ -16,6 +16,14 @@ jobs:
with:
node-version: 10
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
run: sh setup.sh
- name: Install Cocoapods
@ -23,8 +31,8 @@ jobs:
gem install cocoapods
- name: Echo current Version
run: |
echo ${GITHUB_REF:10}>version
echo "Current Version is "${GITHUB_REF:10}
echo ${GITHUB_REF:11}>version
echo "Current Version is "${GITHUB_REF:11}
- name: Publish
run: |
sh publish.sh

View File

@ -20,4 +20,6 @@ git cherry-pick $LATEST_HASH
git tag "$CURRENT_VERSION"_legacy
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/
echo "Commit changes"
git add .
git commit -m "Release v${CURRENT_VERSION}"
git tag ${CURRENT_VERSION}
git push
git push --tags
echo "Publish JS"
cd $CURRENT_DIR/doric-js && npm publish