forked from Chaotic-Logic/terraform-provider-discord
-
Notifications
You must be signed in to change notification settings - Fork 21
43 lines (43 loc) · 1.26 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
name: Release
on:
workflow_dispatch:
inputs:
new_version:
description: New version number without prefix. (e.g. "1.1.0", "2.0.0", and more)
type: string
required: true
jobs:
goreleaser:
name: Make a release on GitHub
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
cache: true
go-version-file: go.mod
- name: Add tag and push it
env:
NEW_VERSION: ${{ github.event.inputs.new_version }}
run: |
git tag v"$NEW_VERSION"
git push origin v"$NEW_VERSION"
- name: Import GPG key
id: import_gpg
uses: crazy-max/[email protected]
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
- name: Git as GitHub Actions Bot
uses: Lucky3028/[email protected]
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: release --clean
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}