generated from kyma-project/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 8
44 lines (39 loc) · 1.17 KB
/
create-draft-release-reusable.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
name: Create draft release (reusable)
on:
workflow_call:
inputs:
VERSION:
required: true
type: string
description: The semantic version number.
secrets:
BOT_PAT:
required: true
description: The github personal access token of your bot.
GH_TOKEN:
required: true
jobs:
create-draft-release:
name: Create a draft release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Write changelog to file
env:
VERSION: ${{ inputs.VERSION }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
shell: bash
run: |
curl -sL https://raw.githubusercontent.com/kyma-project/eventing-tools/b3ca34f38eb11a70bbde9a830bb86d9f069fb0fa/hack/scripts/create_changelog.sh | bash -s "${VERSION}"
- name: Print out changelog
run: cat CHANGELOG.md
- name: Create the draft release
env:
VERSION: ${{ inputs.VERSION }}
GH_TOKEN: ${{ secrets.BOT_PAT }}
shell: bash
run: |
gh release create "${VERSION}" --draft --notes-file CHANGELOG.md