Skip to content

Commit

Permalink
reuse output
Browse files Browse the repository at this point in the history
  • Loading branch information
mrehan27 committed Aug 6, 2024
1 parent 012cc17 commit 03e632c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/build-sample-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,16 @@ jobs:
APP_VERSION_NAME: ${{ env.APP_VERSION_NAME }}
APP_VERSION_CODE: ${{ env.APP_VERSION_CODE }}

# - name: Update Flutter SDK Version
# uses: maierj/fastlane-action@v3.1.0
# with:
# lane: "update_flutter_sdk_version"
# subdirectory: "apps/${{ matrix.sample-app }}"
#
- name: Update Flutter SDK Version
uses: maierj/fastlane-action@v3.1.0
with:
lane: "update_flutter_sdk_version"
subdirectory: "apps/${{ matrix.sample-app }}"
env:
SDK_VERSION_NAME: ${{ steps.generate_version.outputs.SDK_VERSION_NAME }}
APP_VERSION_NAME: ${{ steps.generate_version.outputs.APP_VERSION_NAME }}
APP_VERSION_CODE: ${{ steps.generate_version.outputs.APP_VERSION_CODE }}

- name: Update Sample App Version
uses: maierj/fastlane-action@v3.1.0
with:
Expand Down
12 changes: 6 additions & 6 deletions apps/amiapp_flutter/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ lane :generate_new_version do |options|
app_version_name = sdk_version_name
end
app_version_code = time_in_millis

ENV['SDK_VERSION_NAME'] = sdk_version_name
ENV['APP_VERSION_NAME'] = app_version_name
ENV['APP_VERSION_CODE'] = app_version_code.to_s

UI.message("Generated new versions => SDK: #{sdk_version_name}, App: #{app_version_name} (#{app_version_code})")
UI.message("Env vars => SDK_VERSION_NAME: #{ENV['SDK_VERSION_NAME']}, APP_VERSION_NAME: #{ENV['APP_VERSION_NAME']}, APP_VERSION_CODE: #{ENV['APP_VERSION_CODE']}")

puts ({
SDK_VERSION_NAME: sdk_version_name,
APP_VERSION_NAME: app_version_name,
APP_VERSION_CODE: app_version_code.to_s
})
end

# Helper method to update pubspec version
Expand Down

0 comments on commit 03e632c

Please sign in to comment.