-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (44 loc) · 1.45 KB
/
Copy pathrelease.yml
File metadata and controls
52 lines (44 loc) · 1.45 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
# SPDX-FileCopyrightText: 2026 Kalle Fagerberg
#
# SPDX-License-Identifier: CC0-1.0
name: release
on:
push:
tags:
- "v*"
permissions: {}
jobs:
release:
runs-on: ubuntu-latest
permissions:
# Required to upload binaries to GitHub releases
contents: write
# Required for signing (sigstore)
attestations: write
# Required for using GitHub IdP (when signing)
id-token: write
steps:
- name: checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: setup go
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # 6.5.0
with:
go-version-file: go.mod
cache: false # no cache to avoid cache-poisoning: https://docs.zizmor.sh/audits/#cache-poisoning
- uses: jdx/mise-action@e6a8b3978addb5a52f2b4cd9d91eafa7f0ab959d # v4.2.0
with:
cache: false # no cache to avoid cache-poisoning: https://docs.zizmor.sh/audits/#cache-poisoning
- name: create package
run: |
mise run package
- name: attest release artifacts
uses: actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
with:
subject-path: "dist/*.zip"
- name: upload assets to release
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release upload "$GITHUB_REF_NAME" -- dist/*.zip