Skip to content

Commit a72d89a

Browse files
committed
ci: update release config
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
1 parent 6daeb06 commit a72d89a

3 files changed

Lines changed: 47 additions & 27 deletions

File tree

.github/workflows/build.yml

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -40,30 +40,3 @@ jobs:
4040
with:
4141
token: ${{ secrets.CODECOV_TOKEN }}
4242
file: ./coverage.txt
43-
- uses: goreleaser/goreleaser-action@1a80836c5c9d9e5755a25cb59ec6f45a3b5f41a8 # v7.2.1
44-
if: success() && startsWith(github.ref, 'refs/tags/') && matrix.os == 'ubuntu-latest' && matrix.go-version == 'stable' # editorconfig-checker-disable-line
45-
with:
46-
version: latest
47-
distribution: goreleaser-pro
48-
args: release --clean
49-
env:
50-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51-
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
52-
dependabot:
53-
needs: [build]
54-
runs-on: ubuntu-latest
55-
permissions:
56-
pull-requests: write
57-
contents: write
58-
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}}
59-
steps:
60-
- id: metadata
61-
uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0
62-
with:
63-
github-token: "${{ secrets.GITHUB_TOKEN }}"
64-
- run: |
65-
gh pr review --approve "$PR_URL"
66-
gh pr merge --squash --auto "$PR_URL"
67-
env:
68-
PR_URL: ${{github.event.pull_request.html_url}}
69-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.github/workflows/release.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
id-token: write
11+
packages: write
12+
attestations: write
13+
14+
jobs:
15+
release:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
19+
with:
20+
fetch-depth: 0
21+
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
22+
with:
23+
go-version-file: go.mod
24+
- uses: sigstore/cosign-installer@cad07c2e89fa2edd6e2d7bab4c1aa38e53f76003 # v4.1.1
25+
- uses: anchore/sbom-action/download-syft@e22c389904149dbc22b58101806040fa8d37a610 # v0.24.0
26+
- uses: goreleaser/goreleaser-action@e24998b8b67b290c2fa8b7c14fcfa7de2c5c9b8c # v7.1.0
27+
with:
28+
version: latest
29+
distribution: goreleaser-pro
30+
args: release --clean
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
34+
- uses: actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32 # v4.1.0
35+
with:
36+
subject-checksums: ./dist/checksums.txt

.goreleaser.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json
22
version: 2
3+
pro: true
4+
35
includes:
46
- from_url:
57
url: https://raw.githubusercontent.com/caarlos0/.goreleaserfiles/main/lib.yml
8+
9+
source:
10+
enabled: true
11+
12+
sboms:
13+
- artifacts: source
14+
15+
checksum:
16+
name_template: checksums.txt

0 commit comments

Comments
 (0)