-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (45 loc) · 1.38 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
name: build-and-release
on:
push:
tags:
- v*
permissions:
contents: write
packages: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_SIGNING_KEY }}
- name: "Create GPG_SIGNING_KEY file"
run: "echo '${{ secrets.GPG_SIGNING_KEY }}' > /tmp/key.gpg"
- name: "Save Iteration in Revision"
run: "REVISION=(git rev-list --count --all || echo 0) > $GITHUB_ENV"
- uses: actions/setup-go@v5
with:
go-version: stable
cache: true
- uses: goreleaser/goreleaser-action@v5
with:
version: nightly
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Use a fine grained PAT with Contents: R/W on golift/homebrew-mugs.
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
GPG_SIGNING_KEY: /tmp/key.gpg
GPG_SIGNING_KEY_ID: ${{ steps.import_gpg.outputs.keyid }}
- uses: golift/upload-packagecloud@v1
with:
userrepo: golift/pkgs
apitoken: ${{ secrets.PACKAGECLOUD_TOKEN }}
packages: dist/
rpmdists: el/6
debdists: ubuntu/focal