-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (51 loc) · 1.82 KB
/
release.yaml
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
55
---
name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate Release Notes
run: |
sed -n -e "1{/# /d;}" -e "2{/^$/d;}" -e "/# $(git describe --abbrev=0 --exclude="$(git describe --abbrev=0 --match='v*.*.*' --tags)" --match='v*.*.*' --tags | tr -d v)/q;p" CHANGELOG.md > /tmp/release-notes.txt
cat /tmp/release-notes.txt
# - uses: actions/upload-artifact@v4
# with:
# name: release-notes
# path: release-notes.txt
# retention-days: 1
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: 'go.mod'
cache: true
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
id: import_gpg
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: List Keys
run: |
gpg -K
gpg --version
touch /tmp/gpg.txt
#export GPG_TTY=`tty`
gpg --batch -v --local-user 757DDAB02162B265B8EBCAE7BB930A0409E53BBA --output /tmp/gpg.encr --detach-sign /tmp/gpg.txt
cat /tmp/gpg.encr
# - name: Run GoReleaser
## uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0
# uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0
# with:
# args: release --clean --release-notes /tmp/release-notes.txt
# env:
# # GitHub sets the GITHUB_TOKEN secret automatically.
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}