Skip to content

Commit

Permalink
Replace the Github deployment with a new one with tag ref
Browse files Browse the repository at this point in the history
  • Loading branch information
pyby committed Apr 6, 2024
1 parent 1210330 commit 733550b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -1906,6 +1906,10 @@ end
def add_github_deployment_tag_success(lane)
return unless ENV.fetch('NEW_PLAY_TAG', nil)

# Avoid having twice deployments.
update_github_deployment_inactive(lane)
delete_github_deployment(lane)

create_github_deployment(lane)
update_github_deployment_success(lane)
ENV.delete('NEW_PLAY_TAG')
Expand All @@ -1923,6 +1927,10 @@ def update_github_deployment_error(lane)
update_github_deployment('error', lane)
end

def update_github_deployment_inactive(lane)
update_github_deployment('inactive', lane)
end

def update_github_deployment(state, lane)
deployment_id = ENV.fetch('GITHUB_DEPLOYMENT_ID', nil)
environment = github_environment(lane)
Expand Down

0 comments on commit 733550b

Please sign in to comment.