-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
124440a
commit 4425d11
Showing
3 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Release | ||
on: | ||
release: | ||
types: [published] | ||
jobs: | ||
build: | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: setup JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
- uses: actions/setup-node@v1 | ||
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 "[email protected]" | ||
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: Install Cocoapods | ||
run: | | ||
gem install cocoapods | ||
- name: Echo current Version | ||
run: | | ||
echo ${GITHUB_REF:11}>version | ||
echo "Current Version is "${GITHUB_REF:11} | ||
- name: Publish | ||
run: | | ||
sh publish.sh | ||
env: | ||
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
BINTARY_USER: ${{ secrets.BINTARY_USER }} | ||
BINTARY_REPO: ${{ secrets.BINTARY_REPO }} | ||
BINTARY_APIKEY: ${{ secrets.BINTARY_APIKEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/usr/bin/env bash | ||
############################################################################## | ||
## | ||
## Publish JS,Android,iOS | ||
## | ||
############################################################################## | ||
|
||
CURRENT_DIR=$(cd $(dirname $0); pwd) | ||
CURRENT_VERSION=$(cat $CURRENT_DIR/version) | ||
|
||
echo "Current version is "$CURRENT_VERSION | ||
|
||
## iOS | ||
sed -i "" "s/\(version[ ]*= \)'[0-9 \.]*'/\1'$CURRENT_VERSION'/g" $CURRENT_DIR/DoricWebView.podspec | ||
|
||
# git save | ||
cd $CURRENT_DIR/ | ||
|
||
echo "Commit changes" | ||
git add . | ||
git commit -m "Release v${CURRENT_VERSION}" | ||
|
||
## JS | ||
cd $CURRENT_DIR && npm version $CURRENT_VERSION --allow-same-version | ||
|
||
git tag ${CURRENT_VERSION} | ||
|
||
git push | ||
|
||
git push --tags | ||
|
||
npm install doric-cli -g | ||
|
||
npm install | ||
|
||
cd example && npm install && cd .. | ||
|
||
|
||
echo "Publish JS" | ||
cd $CURRENT_DIR/ && npm publish | ||
echo "Publish Android" | ||
cd $CURRENT_DIR/example/android && ./gradlew clean :lib:uploadArchives | ||
echo "Publish iOS" | ||
cd $CURRENT_DIR && pod trunk push DoricWebView.podspec --allow-warnings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0.1.0 |