-
Notifications
You must be signed in to change notification settings - Fork 10
62 lines (52 loc) · 2.07 KB
/
update-entrypoint.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Update changelog
on:
repository_dispatch:
types: [create-pr]
env:
PR_REVIEWER: ERussel,leohar,valentunn,stepanLav
jobs:
create-pr-to-update:
runs-on: ubuntu-latest
outputs:
pr-url: ${{ steps.pr.outputs.pull-request-url }}
steps:
- uses: actions/checkout@v4
- name: Payload extraction
id: payload
run: |
echo "VERSION=${{ github.event.client_payload.version }}" >> $GITHUB_ENV
echo "COMMENT_LINK=${{ github.event.client_payload.comment_link }}" >> $GITHUB_ENV
echo "TIME=${{ github.event.client_payload.time }}" >> $GITHUB_ENV
echo "SEVERITY=${{ github.event.client_payload.severity }}" >> $GITHUB_ENV
- name: Fetch comment body and save to file
run: |
COMMENT_BODY=$(curl --location '${{ env.COMMENT_LINK }}' | jq -r '.body' | sed 's/Release notes:\\r\\n//g')
echo "$COMMENT_BODY" > updates/changelogs/release/${{ env.VERSION }}.md
- name: Update entrypoint_release
run: python scripts/version_updater.py ${{ env.VERSION }} ${{ env.TIME }} ${{ env.SEVERITY }}
- name: Make Pull Request
id: pr
uses: ./.github/workflows/make-pull-request
with:
commit-files: ./
commit-message: Create release notes for ${{ env.VERSION }}
app-id: ${{ secrets.PR_APP_ID}}
app-token: ${{ secrets.PR_APP_TOKEN}}
pr-reviewer: ${{ env.PR_REVIEWER }}
branch-name: release-notes-${{ env.VERSION }}
pr-title: 🚀 Release notes for ${{ env.VERSION }}
pr-body: This PR was generated automatically 🤖
pr-base: master
alert:
runs-on: ubuntu-latest
needs: [create-pr-to-update]
steps:
- name: Report
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
message: |
🚀 New Android release notes have been created, please check them out:
PR:
${{ needs.create-pr-to-update.outputs.pr-url }}