pref(user): 添加获取用户信息 (#32) #8
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
# name: Build Android | |
# run-name: Creating Production Ready Android App 🚀 | |
# on: | |
# push: | |
# tags: | |
# - 'v*.*.*' # Only trigger the workflow on tag push | |
# jobs: | |
# build: | |
# permissions: write-all | |
# name: Build APK | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Checkout source | |
# uses: actions/checkout@v3 | |
# - name: Setup java | |
# uses: actions/setup-java@v3 | |
# with: | |
# distribution: 'zulu' | |
# java-version: '17' | |
# - name: Setup Node.js | |
# uses: actions/setup-node@v3 | |
# with: | |
# node-version: 20.x | |
# - name: Install pnpm | |
# run: npm install -g pnpm --registry http://registry.npmmirror.com | |
# - name: install dependencies | |
# run: pnpm i | |
# - name: Create Build Folder | |
# run: pnpm build:mobile | |
# - name: Add android folder if not present | |
# run: if [ ! -d "./android" ]; then npx cap add android; fi | |
# - name: Capacitor update | |
# run: npx cap update | |
# - name: Capacitor copy | |
# run: npx cap copy | |
# # TODO: Check for folder structure in README for generating splash screen | |
# - name: Generate icons and splash screen to android folder | |
# run: if [ -d "./resources" ]; then npm install @capacitor/assets --save-dev && npx capacitor-assets generate --android; fi | |
# - name: Build app bundle | |
# run: cd android && ./gradlew bundle && ./gradlew assembleRelease | |
# - name: Extract Android signing key from env | |
# run: | | |
# echo "${{ secrets.RELEASE_KEYSTORE }}" > android/release.jks.base64 | |
# base64 -d android/release.jks.base64 > android/release.decrypted.jks | |
# - name: Sign dev build | |
# run: jarsigner -keystore android/release.decrypted.jks -storepass "${{ secrets.RELEASE_KEYSTORE_PASSWORD }}" -signedjar ./android/app/build/outputs/bundle/release/app-release-signed.aab ./android/app/build/outputs/bundle/release/app-release.aab release | |
# - name: Check folder content of android output | |
# run: ls ./android/app/build/outputs/bundle/release | |
# - name: Set version | |
# id: version | |
# run: echo "VERSION=${{ github.ref_name }}" >> "$GITHUB_OUTPUT" | |
# - name: Create Release | |
# id: create_release | |
# uses: actions/create-release@v1 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.github_token }} | |
# with: | |
# tag_name: ${{ steps.version.outputs.VERSION }} | |
# release_name: Release ${{ steps.version.outputs.VERSION }} | |
# draft: false | |
# prerelease: true | |
# - name: Upload Release Asset .aab | |
# id: upload-release-asset-aab | |
# uses: actions/upload-release-asset@v1 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.github_token }} | |
# with: | |
# upload_url: ${{ steps.create_release.outputs.upload_url }} | |
# asset_path: ./android/app/build/outputs/bundle/release/app-release-signed.aab | |
# # Customize the asset name. If not specified, the file name is used. | |
# asset_name: app-release-signed.aab | |
# asset_content_type: application/zip | |
# - name: Upload Release Asset .apk | |
# id: upload-release-asset-apk | |
# uses: actions/upload-release-asset@v1 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.github_token }} | |
# with: | |
# upload_url: ${{ steps.create_release.outputs.upload_url }} | |
# asset_path: ./android/app/build/outputs/apk/release/COSS-${{ github.ref_name }}.apk | |
# # Customize the asset name. If not specified, the file name is used. | |
# asset_name: COSS-${{ github.ref_name }}.apk | |
# asset_content_type: application/vnd.android.package-archive |