-
Notifications
You must be signed in to change notification settings - Fork 569
42 lines (35 loc) · 1.1 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
name: release
permissions: write-all
on:
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
with:
ref: main
fetch-depth: 0 # required to generate contributor list
- name: Install Go
uses: actions/[email protected]
with:
stable: false
go-version: 1.22
- name: Prepare release
id: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
go run internal/cmd/release/main.go
- name: Commit and push hanges
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update release notes"
git push
- name: Publish draft release
env:
RELEASE_API_URL: ${{ steps.release.outputs.RELEASE_URL }}
run: |
curl -X PATCH -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -H "Accept: application/vnd.github.v3+json" $RELEASE_API_URL -d '{"draft": false}'