-
-
Notifications
You must be signed in to change notification settings - Fork 23
61 lines (55 loc) · 1.87 KB
/
release.yml
File metadata and controls
61 lines (55 loc) · 1.87 KB
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
name: release
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to release'
required: true
version:
description: 'Release version'
required: true
jobs:
goreleaser:
name: Release
runs-on: ubuntu-latest
permissions:
issues: write
contents: write
deployments: write
id-token: write
steps:
- name: Checkout Code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
with:
ssh-key: ${{ secrets.RELEASE_DEPLOY_KEY }}
fetch-depth: 0
ref: ${{ github.event.inputs.branch }}
- name: Set up Go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 #v6.3.0
with:
go-version-file: ./go.mod
cache-dependency-path: ./go.sum
- name: Place a Git tag and push it
run: |
git config user.name "microcks-bot"
git config user.email "info@microcks.io"
git tag ${{ github.event.inputs.version }}
git push origin ${{ github.event.inputs.version }}
- name: Import GPG key
id: import-gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GORELEASER_GPG_SECRET_KEY }}
passphrase: ${{ secrets.GORELEASER_GPG_PASSPHRASE }}
- name: Install Syft for GoReleaser
run: |
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin
- name: Publish Homebrew package with Goreleaser
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0
with:
distribution: goreleaser
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.PUBLISHER_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import-gpg.outputs.fingerprint }}