-
Notifications
You must be signed in to change notification settings - Fork 104
35 lines (35 loc) · 1.16 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: release
on:
release:
types: [published]
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm i
- run: npx tsc
- run: npm pack
- run: npx react-native init example
- run: cp index.js example/
- run: npm i ../react-native-amap-geolocation-0.0.0.tgz
working-directory: example
- run: sed -i.backup -r 's/(enableSeparateBuildPerCPUArchitecture = )false/\1true/' build.gradle
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 }}