From 7bb5cd2978012c9f4086122d97513eb70ed93d2a Mon Sep 17 00:00:00 2001 From: Shueh Chou Lu Date: Sun, 17 Sep 2023 19:51:41 +0800 Subject: [PATCH] ci: print version --- .github/workflows/deploy-to-playstore.yaml | 6 ++- .github/workflows/release-candidate.yaml | 50 +++++++++---------- android/fastlane/README.md | 56 ++++++++++++++++++++++ android/fastlane/report.xml | 13 +++++ 4 files changed, 98 insertions(+), 27 deletions(-) create mode 100644 android/fastlane/README.md create mode 100644 android/fastlane/report.xml diff --git a/.github/workflows/deploy-to-playstore.yaml b/.github/workflows/deploy-to-playstore.yaml index 524d6b12..4a5f10cd 100644 --- a/.github/workflows/deploy-to-playstore.yaml +++ b/.github/workflows/deploy-to-playstore.yaml @@ -136,7 +136,7 @@ jobs: - name: Setup Fastlane uses: ruby/setup-ruby@v1 with: - ruby-version: "2.6" + ruby-version: "3.2" bundler-cache: true working-directory: android @@ -174,7 +174,9 @@ jobs: # Build and deploy with Fastlane (by default, to internal track) 🚀. # Naturally, promote_to_production only deploys. - name: Fastlane building - run: bundle exec fastlane ${{ needs.var.outputs.lane }} + # bundle exec fastlane ${{ needs.var.outputs.lane }} + run: | + bundle exec fastlane --version env: PLAY_STORE_CONFIG_JSON: ${{ secrets.PLAY_STORE_CONFIG_JSON }} BUILD_NUMBER: ${{ needs.var.outputs.dev_build_number }} diff --git a/.github/workflows/release-candidate.yaml b/.github/workflows/release-candidate.yaml index 0e9e73c5..db55dcf2 100644 --- a/.github/workflows/release-candidate.yaml +++ b/.github/workflows/release-candidate.yaml @@ -151,28 +151,28 @@ jobs: working-directory: android # Build the application. - - name: Start building - run: | - flutter build -v apk --release --flavor dev - mv build/app/outputs/flutter-apk/app-dev-release.apk \ - $GITHUB_WORKSPACE/pos_system.apk - - - name: Get upload URL - id: get_release - run: | - release=$(curl -s \ - -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ - -H 'Accept: application/vnd.github.v3+json' \ - https://api.github.com/repos/evan361425/flutter-pos-system/releases \ - | jq -c '.[] | select( .name | contains("${{ needs.check-version.outputs.tag_version }}"))') - echo "::set-output name=upload_url::$(echo "$release" | jq -r '.upload_url')" - - # Upload the build. - - name: Upload built package to release - id: upload_release_asset - uses: shogo82148/actions-upload-release-asset@v1 - with: - upload_url: ${{ steps.get_release.outputs.upload_url }} - asset_path: ./pos_system.apk - asset_name: pos_system.dev.${{ needs.check-version.outputs.build_code }}.apk - asset_content_type: application/vnd.android.package-archive + # - name: Start building + # run: | + # flutter build -v apk --release --flavor dev + # mv build/app/outputs/flutter-apk/app-dev-release.apk \ + # $GITHUB_WORKSPACE/pos_system.apk + + # - name: Get upload URL + # id: get_release + # run: | + # release=$(curl -s \ + # -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + # -H 'Accept: application/vnd.github.v3+json' \ + # https://api.github.com/repos/evan361425/flutter-pos-system/releases \ + # | jq -c '.[] | select( .name | contains("${{ needs.check-version.outputs.tag_version }}"))') + # echo "::set-output name=upload_url::$(echo "$release" | jq -r '.upload_url')" + + # # Upload the build. + # - name: Upload built package to release + # id: upload_release_asset + # uses: shogo82148/actions-upload-release-asset@v1 + # with: + # upload_url: ${{ steps.get_release.outputs.upload_url }} + # asset_path: ./pos_system.apk + # asset_name: pos_system.dev.${{ needs.check-version.outputs.build_code }}.apk + # asset_content_type: application/vnd.android.package-archive diff --git a/android/fastlane/README.md b/android/fastlane/README.md new file mode 100644 index 00000000..93fc6bf5 --- /dev/null +++ b/android/fastlane/README.md @@ -0,0 +1,56 @@ +fastlane documentation +---- + +# Installation + +Make sure you have the latest version of the Xcode command line tools installed: + +```sh +xcode-select --install +``` + +For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane) + +# Available Actions + +## Android + +### android test + +```sh +[bundle exec] fastlane android test +``` + +Test locally + +### android internal + +```sh +[bundle exec] fastlane android internal +``` + +Submit a new Internal Build to Play Store + +### android beta + +```sh +[bundle exec] fastlane android beta +``` + +Submit a new Beta Build to Crashlytics Beta + +### android promote_to_production + +```sh +[bundle exec] fastlane android promote_to_production +``` + +Promote beta track to prod + +---- + +This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run. + +More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools). + +The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools). diff --git a/android/fastlane/report.xml b/android/fastlane/report.xml new file mode 100644 index 00000000..e1de1753 --- /dev/null +++ b/android/fastlane/report.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + +