-
Notifications
You must be signed in to change notification settings - Fork 7
37 lines (33 loc) · 1.21 KB
/
release-please.yml
File metadata and controls
37 lines (33 loc) · 1.21 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
---
name: Create Release
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
id: token
with:
app-id: ${{ vars.FOREST_RELEASER_APP_ID }}
private-key: ${{ secrets.FOREST_RELEASER_APP_PRIVATE_KEY }}
- uses: googleapis/release-please-action@a02a34c4d625f9be7cb89156071d8567266a2445 # v4.2.0
id: release
with:
token: ${{ steps.token.outputs.token }}
- name: Amend release description
if: ${{ steps.release.outputs.release_created }}
env:
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
run: |
CURRENT_NOTES=$(gh release view ${{ steps.release.outputs.tag_name }} --json body -q '.body')
HEADER=$(echo "$CURRENT_NOTES" | awk '/^## / {print; exit}')
TEMPLATE=$(cat ../RELEASE_TEMPLATE.md)
BODY=$(echo "$CURRENT_NOTES" | sed "0,/^## /d")
gh release edit ${{ steps.release.outputs.tag_name }} --notes "${HEADER}${TEMPLATE}${BODY}"