-
Notifications
You must be signed in to change notification settings - Fork 9
84 lines (74 loc) · 2.79 KB
/
Copy pathrelease.yml
File metadata and controls
84 lines (74 loc) · 2.79 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# .github/workflows/release.yml
name: goreleaser
on:
push:
# run only against tags
tags:
- "*"
permissions: {}
jobs:
goreleaser:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
attestations: write
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version: stable
- name: Install Cosign
uses: sigstore/cosign-installer@6f9f17788090df1f26f669e9d70d6ae9567deba6 # v4.1.2
- name: Setup Syft
uses: anchore/sbom-action/download-syft@e22c389904149dbc22b58101806040fa8d37a610 # v0
with:
syft-version: v1.39.0
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@5daf1e915a5f0af01ddbcd89a43b8061ff4f1a89 # v7
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser-pro
# 'latest', 'nightly', or a semver
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
- name: Attest build provenance
uses: actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32 # v4
with:
subject-path: |
dist/*.tar.gz
dist/*.deb
dist/*.rpm
dist/*.apk
dist/*.sbom.json
dist/checksums.txt
- name: Publish to frostyard repo
uses: frostyard/repogen/.github/actions/publish-to-r2@1fcb45da32aa302f191bcfdf9de541adf9625aa8 # main
with:
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }}
r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
r2-bucket: frostyardrepo
purge-cache: "true"
cloudflare-zone: ${{ secrets.CLOUDFLARE_ZONE }}
cloudflare-api-token: ${{ secrets.CLOUDFLARE_API_TOKEN }}
gpg-private-key: ${{ secrets.REPOGEN_GPG_KEY }}
packages-dir: ./dist
package-type: deb # or sysext
base-url: https://repository.frostyard.org # required for sysext
- name: snosi
if: github.event_name != 'pull_request' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
continue-on-error: true
uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v4
with:
token: ${{ secrets.ORG_PAT }}
repository: frostyard/snosi
event-type: build