Skip to content

Commit

Permalink
调整发布脚本,npm publish 与 build example 并行
Browse files Browse the repository at this point in the history
  • Loading branch information
qiuxiang committed Feb 14, 2023
1 parent 2b73cea commit f50289b
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,21 @@ on:
release:
types: [published]
jobs:
release:
publish:
runs-on: ubuntu-latest
steps:
- uses: bruceadams/[email protected]
id: release
env:
GITHUB_TOKEN: ${{ github.token }}
- uses: actions/setup-node@v3
with:
registry-url: "https://registry.npmjs.org"
- run: npm version ${{ steps.release.outputs.tag_name }} --no-git-tag-version
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
build-example:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -19,18 +33,7 @@ jobs:
working-directory: example/android/app
- run: ./gradlew assembleRelease
working-directory: example/android
- uses: bruceadams/[email protected]
id: release
env:
GITHUB_TOKEN: ${{ github.token }}
- uses: svenstaro/upload-release-action@v2
with:
file: example/android/app/build/outputs/apk/release/app-arm64-v8a-release.apk
asset_name: example.apk
- uses: actions/setup-node@v3
with:
registry-url: "https://registry.npmjs.org"
- run: npm version ${{ steps.release.outputs.tag_name }} --no-git-tag-version
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
file: example/android/app/build/outputs/apk/release/app-*-release.apk
file_glob: true

0 comments on commit f50289b

Please sign in to comment.