File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 - master
88 types :
99 - completed
10+ workflow_dispatch :
11+ inputs :
12+ version :
13+ description : ' Version to announce'
14+ required : true
1015permissions :
16+ actions : read
17+ contents : read
1118 issues : write
1219 pull-requests : write
1320
1421jobs :
1522 announce-release-on-released-pull-requests :
1623 name : Announce release on released pull requests
1724 runs-on : ubuntu-latest
18- if : ${{ github.event.workflow_run.conclusion == 'success' }}
25+ if : ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
1926 steps :
20- - name : Checkout repository
21- uses : actions/checkout@v6
27+ - name : Download release tag artifact
28+ if : ${{ github.event_name == 'workflow_run' }}
29+ uses : actions/download-artifact@v7
2230 with :
23- ref : master
31+ github-token : ${{ secrets.GITHUB_TOKEN }}
32+ run-id : ${{ github.event.workflow_run.id }}
33+ name : release_tag
34+
35+ - name : Extract version from artifact
36+ if : ${{ github.event_name == 'workflow_run' }}
37+ run : |
38+ if [ ! -f "latest_fl_version.txt" ]; then
39+ echo "latest_fl_version.txt not found in expected locations"
40+ exit 1
41+ fi
42+ echo "FL_VERSION=$(cat latest_fl_version.txt)" >> "$GITHUB_ENV"
43+
44+ - name : Set version from workflow_dispatch input
45+ if : ${{ github.event_name == 'workflow_dispatch' }}
46+ run : echo "FL_VERSION=${{ github.event.inputs.version }}" >> "$GITHUB_ENV"
47+
2448 - name : Announce release on released pull requests
2549 uses : fastlane/github-actions/communicate-on-pull-request-released@latest
2650 with :
51+ version : ${{ env.FL_VERSION }}
2752 repo-token : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 5555 SLACK_URL : ${{ secrets.SLACK_URL }}
5656 run : |
5757 bundle exec fastlane create_github_release skip_github_packages:${{ github.event.inputs.skip_github_packages }} skip_rubygems:${{ github.event.inputs.skip_rubygems }}
58+
59+ - uses : actions/upload-artifact@v6
60+ with :
61+ name : release_tag
62+ path : latest_fl_version.txt
63+ retention-days : 1
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ test_output/
1414.DS_Store
1515.keys
1616* .swp
17+ latest_fl_version.txt
1718
1819# # Specific to Android
1920.gradle /
Original file line number Diff line number Diff line change @@ -251,6 +251,9 @@ lane :create_github_release do |options|
251251 UI . user_error! ( "Version number #{ version } was already deployed" )
252252 end
253253
254+ # Set the version into an ENV variable for GitHub Actions to read
255+ ENV [ 'FASTLANE_RELEASE_VERSION' ] = version
256+
254257 github_username = ENV [ "RELEASE_GITHUB_USERNAME" ] || "fastlane"
255258 repo_name = "#{ github_username } /fastlane"
256259
@@ -279,6 +282,7 @@ lane :create_github_release do |options|
279282 release_url = github_release [ 'html_url' ]
280283 message = [ title , description , release_url ] . join ( "\n \n " )
281284 add_fastlane_git_tag ( tag : "fastlane/#{ version } " , message : message )
285+ File . write ( "../latest_fl_version.txt" , version )
282286
283287 UI . success ( "New GitHub release has been created: #{ release_url } " )
284288 else
You can’t perform that action at this time.
0 commit comments