Skip to content

Commit

Permalink
Add build docs action
Browse files Browse the repository at this point in the history
  • Loading branch information
qiuxiang committed Feb 13, 2023
1 parent 1166d3b commit 78db18a
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 31 deletions.
12 changes: 0 additions & 12 deletions .github/issue_template.md

This file was deleted.

16 changes: 16 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: build-docs
on:
push:
branches: [main]
jobs:
build-docs:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- run: npm i typescript typedoc
- run: npx typedoc --out docs/api --skipErrorChecking src
- uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs
33 changes: 14 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,31 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: npm pack
- run: npx react-native init example
working-directory: ../
- run: cp index.js ../example/
- run: cp -r example ../example/
- run: npm i ../react-native-amap3d/react-native-amap3d-0.0.0.tgz
working-directory: ../example
- run: cp index.js example/
- run: cp -r example example/
- run: npm i ../react-native-amap3d-0.0.0.tgz
working-directory: example
- run: npm i @react-native-picker/picker @react-navigation/native @react-navigation/native-stack react-native-safe-area-context react-native-screens
working-directory: ../example
working-directory: example
- run: sed -i.backup -r 's/(enableSeparateBuildPerCPUArchitecture = )false/\1true/' build.gradle
working-directory: ../example/android/app
working-directory: example/android/app
- run: ./gradlew assembleRelease
working-directory: ../example/android
- uses: bruceadams/get-release@v1.2.3
working-directory: example/android
- uses: bruceadams/get-release@v1.3.2
id: release
env:
GITHUB_TOKEN: ${{ github.token }}
- uses: actions/setup-node@v2
- 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 }}
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.release.outputs.upload_url }}
asset_path: ../example/android/app/build/outputs/apk/release/app-arm64-v8a-release.apk
asset_name: example.apk
asset_content_type: application/vnd.android.package-archive

0 comments on commit 78db18a

Please sign in to comment.