-
Notifications
You must be signed in to change notification settings - Fork 4
70 lines (67 loc) · 2.17 KB
/
autorelease.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# This is a basic workflow to help you get started with Actions
name: release gopass-hibp
# Controls when the action will run.
on:
# Triggers the workflow on tags starting with v, i.e. release tags
push:
tags:
- 'v*'
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22
-
name: Import GPG signing key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
-
name: Debug
run: |
echo "GPG ---------------------"
echo "fingerprint: ${{ steps.import_gpg.outputs.fingerprint }}"
echo "keyid: ${{ steps.import_gpg.outputs.keyid }}"
echo "name: ${{ steps.import_gpg.outputs.name }}"
echo "email: ${{ steps.import_gpg.outputs.email }}"
echo "Go env ------------------"
pwd
echo ${HOME}
echo ${GITHUB_WORKSPACE}
echo ${GOPATH}
echo ${GOROOT}
env
-
name: Generate release-notes
run: |
go run helpers/changelog/main.go >../RELEASE_NOTES
-
name: Run GoReleaser
uses: goreleaser/[email protected]
with:
version: latest
args: release --rm-dist --release-notes=../RELEASE_NOTES
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
GOPATH: /home/runner/go
-
name: "Upload deb files to apt hosting"
run: |
for D in dist/*.deb; do
curl -H"X-Filename: ${D}" -H"X-Apikey: ${APIKEY}" -XPOST --data-binary @$D https://packages.gopass.pw/repos/gopass/upload
curl -H"X-Filename: ${D}" -H"X-Apikey: ${APIKEY}" -XPOST --data-binary @$D https://packages.gopass.pw/repos/gopass-unstable/upload
done
env:
APIKEY: ${{ secrets.APT_APIKEY }}