-
Notifications
You must be signed in to change notification settings - Fork 166
74 lines (62 loc) · 2.08 KB
/
release-please.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
71
72
73
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: "${{ steps.release-please.outputs.release_created }}"
release_tag: "${{ steps.release-please.outputs.tag_name }}"
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# https://github.com/actions/checkout/issues/1467
fetch-depth: 0
- uses: googleapis/release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f # v4.1.3
id: release-please
with:
config-file: .release-please.json
manifest-file: .release-please-manifest.json
github-token: ${{ github.secret }}
release-docker-image:
needs:
- release-please
if: needs.release-please.outputs.release_created
permissions:
contents: write
pull-requests: write
id-token: write
uses: ./.github/workflows/docker.yml
with:
tag: ${{ needs.release-please.outputs.release_tag }}
# If a release was created, also create the binaries and attach them
release-binaries:
runs-on: ubuntu-latest
needs:
- release-please
if: needs.release-please.outputs.release_created
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# https://github.com/actions/checkout/issues/1467
fetch-depth: 0
ref: "${{ needs.release-please.outputs.release_tag }}"
- uses: ./.github/actions/setup-goversion
- name: Build binaries
run: make cross
- name: Attach binaries
uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 # v1.14.0
with:
token: ${{ github.token }}
allowUpdates: true
tag: ${{ needs.release-please.outputs.release_tag }}
omitNameDuringUpdate: true
omitPrereleaseDuringUpdate: true
omitBodyDuringUpdate: true
omitDraftDuringUpdate: true
artifacts: "dist/**/*"