forked from fastlane/fastlane
-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (48 loc) · 1.65 KB
/
announce_release.yml
File metadata and controls
52 lines (48 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---
name: Process release
on:
workflow_run:
workflows: ["Release Step 2 - Create GitHub Release"]
branches:
- master
types:
- completed
workflow_dispatch:
inputs:
version:
description: 'Version to announce'
required: true
permissions:
actions: read
contents: read
issues: write
pull-requests: write
jobs:
announce-release-on-released-pull-requests:
name: Announce release on released pull requests
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
steps:
- name: Download release tag artifact
if: ${{ github.event_name == 'workflow_run' }}
uses: actions/download-artifact@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}
name: release_tag
- name: Extract version from artifact
if: ${{ github.event_name == 'workflow_run' }}
run: |
if [ ! -f "latest_fl_version.txt" ]; then
echo "latest_fl_version.txt not found in expected locations"
exit 1
fi
echo "FL_VERSION=$(cat latest_fl_version.txt)" >> "$GITHUB_ENV"
- name: Set version from workflow_dispatch input
if: ${{ github.event_name == 'workflow_dispatch' }}
run: echo "FL_VERSION=${{ github.event.inputs.version }}" >> "$GITHUB_ENV"
- name: Announce release on released pull requests
uses: fastlane/github-actions/communicate-on-pull-request-released@latest
with:
version: ${{ env.FL_VERSION }}
repo-token: ${{ secrets.GITHUB_TOKEN }}