Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanceriu committed May 9, 2022
1 parent 981c755 commit f2db79b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release-alpha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
# Main step
# The Ad-hoc release link will be referenced as 'DIAWI_FILE_LINK'
# and QR link as 'DIAWI_QR_CODE_LINK' when the Diawi upload succeed
- name: Build Ad-hoc release and send it to Diawi
- name: Build alpha
run: bundle exec fastlane alpha
env:
# Automatically bypass 2FA upgrade if possible on Apple account.
Expand All @@ -74,7 +74,7 @@ jobs:
DIAWI_API_TOKEN: ${{ secrets.DIAWI_API_TOKEN }}
GITHUB_PR_NUMBER: ${{ github.event.number }}

- name: Add or update PR comment with Ad-hoc release informations
- name: Add release notes and Diawi info
uses: NejcZdovc/comment-pr@v1
with:
message: |
Expand Down
19 changes: 10 additions & 9 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ lane :alpha do
adhoc: true
)

update_app_icon()
version = ENV["GITHUB_PR_NUMBER"]

update_app_icon(caption_text: "PR #{version}")

build_ios_app(
clean: true,
Expand All @@ -40,7 +42,7 @@ lane :alpha do

upload_to_diawi()

generate_release_notes()
generate_release_notes(version: version)

end

Expand Down Expand Up @@ -95,11 +97,11 @@ lane :tests do

end

lane :generate_release_notes do
version = ENV["GITHUB_PR_NUMBER"]
lane :generate_release_notes do |options|
Dir.chdir("..") do
Changelog.update_topmost_section(version: version, additional_entries: {})
Changelog.update_topmost_section(version: options[:version], additional_entries: {})
changelog = Changelog.extract_first_section
UI.command_output(changelog)
sh("echo CHANGELOG=#{changelog} >> $GITHUB_ENV")
end
end
Expand Down Expand Up @@ -163,10 +165,9 @@ private_lane :release_to_github do
)
end

private_lane :update_app_icon do
pr_number = ENV["GITHUB_PR_NUMBER"]
UI.user_error!("Invalid GitHub PR number.") unless !pr_number.to_s.empty?
caption_text="PR ##{pr_number}"
private_lane :update_app_icon do |options|
caption_text = options[:caption_text]
UI.user_error!("Invalid caption text.") unless !caption_text.to_s.empty?

Dir.glob("../ElementX/Resources/Assets.xcassets/AppIcon.appiconset/**/*.png") do |file_name|
# Change the icons color
Expand Down

0 comments on commit f2db79b

Please sign in to comment.