-
Notifications
You must be signed in to change notification settings - Fork 4
32 lines (31 loc) · 1.03 KB
/
release.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
name: Release
on:
push:
tags: [ v* ]
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Generate Release Notes
uses: octokit/[email protected]
id: get_release_notes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
route: POST /repos/${{ github.repository }}/releases/generate-notes
tag_name: ${{ github.ref_name }}
previous_tag_name: ${{ steps.last_release.outputs.tag }}
- name: Set Release content
run: |
echo "RELEASE_CONTENT<<EOF" >> $GITHUB_ENV
echo "${{ fromJson(steps.get_release_notes.outputs.data).body }}" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Generate Release
uses: octokit/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
route: POST /repos/${{ github.repository }}/releases
name: ${{ github.ref_name }}
tag_name: ${{ github.ref_name }}
body: ${{ toJSON(env.RELEASE_CONTENT) }}