Skip to content

Commit 7592579

Browse files
authored
Merge pull request #4067 from StoDevX/fastlane-beta-github-actions
fastlane: Add support from beta-ing from GitHub Actions
2 parents 08a437f + fdc8151 commit 7592579

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

fastlane/lib/util.rb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,21 @@ def travis_cron?
2727
def tagged?
2828
travis = ENV['TRAVIS_TAG'] && !ENV['TRAVIS_TAG'].empty?
2929
circle = ENV['CIRCLE_TAG'] && !ENV['CIRCLE_TAG'].empty?
30-
travis || circle
30+
github = ENV['GITHUB_REF'] && ENV['GITHUB_REF'] =~ /^refs\/tags\//
31+
github || travis || circle
3132
end
3233

3334
# does the commit message tell us to make a new beta?
3435
def commit_says_deploy?
35-
commit = ENV['TRAVIS_COMMIT_MESSAGE'] || ENV['GIT_COMMIT_DESC']
36+
commit = ENV['TRAVIS_COMMIT_MESSAGE'] || ENV['GIT_COMMIT_DESC'] || `git show --pretty=format:%B HEAD`
3637
commit =~ /\[ci run beta\]/
3738
end
3839

40+
# are we running on github actions?
41+
def github_actions?
42+
!!ENV['GITHUB_SHA']
43+
end
44+
3945
# are we running on travis?
4046
def travis?
4147
ENV['TRAVIS'] == 'true'

0 commit comments

Comments
 (0)