Repository navigation
72 lines (67 loc) · 2.13 KB
/
Copy pathrelease.yml
File metadata and controls
72 lines (67 loc) · 2.13 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
# Cut a release whenever a version tag (v<dnf5 version>[.<n>]) is pushed.
name: Release
on:
push:
tags:
- "v*.*.*"
workflow_dispatch:
inputs:
tag_name:
description: Existing tag to release
required: true
type: string
permissions:
contents: write
id-token: write
attestations: write
jobs:
build:
uses: ./.github/workflows/build.yaml
secrets:
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }}
release:
needs: build
runs-on: ubuntu-26.04
env:
TAG: ${{ inputs.tag_name || github.ref_name }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ env.TAG }}
fetch-depth: 0
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: dnf5
path: dist
- name: Prepare release
run: .github/workflows/release_prep.sh "$TAG" dist >release_notes.md
- name: Attest build provenance
id: attest
uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
with:
subject-path: |
dist/*.tar.gz
dnf5-prebuilt-*.tar.gz
- name: Generate attestation assets
run: |
cat "${{ steps.attest.outputs.bundle-path }}" | jq --compact-output > "dnf5-prebuilt-${TAG}.tar.gz.intoto.jsonl"
for f in dist/*.tar.gz; do
cat "${{ steps.attest.outputs.bundle-path }}" | jq --compact-output > "${f}.intoto.jsonl"
done
- uses: softprops/action-gh-release@8a0cd651e5b2365bd640854a3fa5dfc70e4875f3 # v3.0.4
with:
tag_name: ${{ env.TAG }}
body_path: release_notes.md
files: |
dist/*.tar.gz
dist/*.intoto.jsonl
dnf5-prebuilt-*.tar.gz
dnf5-prebuilt-*.tar.gz.intoto.jsonl
fail_on_unmatched_files: true
publish:
needs: release
uses: ./.github/workflows/publish.yaml
with:
tag_name: ${{ inputs.tag_name || github.ref_name }}
secrets:
BCR_PUBLISH_TOKEN: ${{ secrets.BCR_PUBLISH_TOKEN }}