-
Notifications
You must be signed in to change notification settings - Fork 121
54 lines (51 loc) · 1.72 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Auto Generate Release Log
on:
workflow_dispatch:
inputs:
tag_name:
required: true
type: string
previous_tag_name:
required: true
type: string
target_commitish:
required: true
type: string
permissions:
contents: write
pull-requests: write
jobs:
generate_changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.23.4"
- name: set version
run: |
echo "VERSION=$(echo "${{inputs.tag_name}}" | cut -d '-' -f1)" >> "$GITHUB_ENV"
- name: generate changelog
run: |
set -e
response=$(curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/Edgenesis/shifu/releases/generate-notes \
-d '{"tag_name":"${{inputs.tag_name}}","target_commitish":"${{inputs.target_commitish}}","previous_tag_name":"${{inputs.previous_tag_name}}"}')
echo $response
go run tools/release/release.go "$response"
env:
AZURE_OPENAI_APIKEY: ${{ secrets.AZURE_OPENAI_APIKEY }}
AZURE_OPENAI_HOST: ${{ secrets.AZURE_OPENAI_HOST }}
DEPLOYMENT_NAME: ${{secrets.DEPLOYMENT_NAME}}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
commit-message: add changelog for ${{env.VERSION}}
title: add changelog for ${{env.VERSION}}
body: add changelog for ${{env.VERSION}}
branch: changelog-${{env.VERSION}}
base: main