update script

This commit is contained in:
pengfei.zhou 2020-03-24 20:18:41 +08:00 committed by osborn
parent b5c44fcefc
commit 7939db48b5
2 changed files with 17 additions and 11 deletions

View File

@ -42,14 +42,3 @@ jobs:
BINTARY_REPO: ${{ secrets.BINTARY_REPO }} BINTARY_REPO: ${{ secrets.BINTARY_REPO }}
BINTARY_APIKEY: ${{ secrets.BINTARY_APIKEY }} BINTARY_APIKEY: ${{ secrets.BINTARY_APIKEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${github.ref:10}_legacy
release_name: Release ${{ github.ref }}_legacy
body: |
Legacy Support
draft: false
prerelease: false

View File

@ -17,5 +17,22 @@ LATEST_HASH=$(git rev-parse origin/legacy/android_support)
git cherry-pick $LATEST_HASH git cherry-pick $LATEST_HASH
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
# get repo name from git
remote=$(git config --get remote.origin.url)
repo=$(basename $remote .git)
commit=$(git rev-parse HEAD)
curl -s -X POST https://api.github.com/repos/doric-pub/$repo/git/refs \
-H "Authorization: token $GITHUB_TOKEN" \
-d @- << EOF
{
"ref": "refs/tags/'$CURRENT_VERSION'_legacy",
"sha": "$commit"
}
EOF