-
Notifications
You must be signed in to change notification settings - Fork 14
51 lines (44 loc) · 1.34 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
---
name: release
on:
workflow_dispatch:
inputs:
version:
description: Tag name (e.g. v1.2.3) for this version (does not need to exist).
required: true
type: string
last_release:
description: Last release tag.
required: true
type: string
permissions:
contents: read
jobs:
draft:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Need full history.
- name: release notes
run: |
go run github.com/hashicorp/go-changelog/cmd/changelog-build@ba40b3a \
-changelog-template .github/release/changelog.gotmpl \
-note-template .github/release/release-note.gotmpl \
-entries-dir ./.changelog \
-last-release "${{ inputs.last_release }}" \
-this-release HEAD | tee /tmp/release-notes.txt
cat << EOF >> /tmp/release-notes.txt
DOWNLOAD:
- \`docker pull docker.elastic.co/observability/stream:${{ inputs.version }}\`
EOF
- name: draft GH release
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create "${{ inputs.version }}" \
--draft \
--notes-file /tmp/release-notes.txt \
--title "${{ inputs.version }}"