-
-
Notifications
You must be signed in to change notification settings - Fork 75
40 lines (40 loc) · 1.27 KB
/
release_announcement.yml
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
name: Release Announcement
on: workflow_dispatch
jobs:
announceReleaseToSocialMedia:
name: Announce Release to Social Media
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get Version
id: versioning
uses: paulhatch/[email protected]
with:
version_format: "${major}.${minor}"
minor_pattern: "(MINOR)"
bump_each_commit: true
debug: true
- name: Prepare Announcement
id: prepare
shell: bash
env:
VERSION: v${{ steps.versioning.outputs.version }}
run: |
RELEASE_NOTES="$(cat fastlane/metadata/en-US/release_notes.txt)"
ANNOUNCEMENT="Released CGS $VERSION!
$RELEASE_NOTES"
printf "$ANNOUNCEMENT"
export ANNOUNCEMENT
echo 'ANNOUNCEMENT<<EOF' >> $GITHUB_OUTPUT
echo "$ANNOUNCEMENT" >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
- name: Discord Announcement
if: github.ref == 'refs/heads/main'
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: Ilshidur/[email protected]
with:
args: ${{ steps.prepare.outputs.ANNOUNCEMENT }}