-
Notifications
You must be signed in to change notification settings - Fork 88
44 lines (39 loc) · 1.14 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
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@v3
with:
fetch-depth: 0 # Need full history.
- name: release notes
run: >-
go run github.com/hashicorp/go-changelog/cmd/changelog-build@ba40b3a
-changelog-template .ci/release/changelog.gotmpl
-note-template .ci/release/release-note.gotmpl
-entries-dir ./.changelog
-last-release "${{ inputs.last_release }}"
-this-release HEAD | tee /tmp/release-notes.txt
- 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 }}"