-
Notifications
You must be signed in to change notification settings - Fork 3
60 lines (57 loc) · 1.71 KB
/
flow-stage.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
---
name: Release Please and GoReleaser
on:
push:
branches:
- main
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- name: Release Please
uses: googleapis/release-please-action@v4
id: release
with:
release-type: go
# The PAT is needed to run required checks on the release PR.
# If a PR is created with the GITHUB_TOKEN, it will not trigger workflows.
token: ${{ secrets.MYKSO_BOT_GITHUB_TOKEN }}
outputs:
release_created: ${{ steps.release.outputs.release_created }}
release:
runs-on: ubuntu-latest
needs: release-please
if: needs.release-please.outputs.release_created == 'true'
permissions:
contents: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.MYKSO_BOT_GPG_PRIVATE_KEY }}
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.22"
- name: GoReleaser
uses: goreleaser/goreleaser-action@v6
env:
AUR_SSH_KEY: ${{ secrets.AUR_SSH_KEY }}
GITHUB_TOKEN: ${{ github.token }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
HOMEBREW_TAP_REPO_TOKEN: ${{ secrets.MYKSO_BOT_GITHUB_TOKEN }}
with:
args: release --clean