Repository navigation
69 lines (60 loc) · 2.02 KB
/
Copy pathrelease.yml
File metadata and controls
69 lines (60 loc) · 2.02 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
name: Create Release
# Manual workflow — source/docs release + integrity manifest. See RELEASING.md
on:
workflow_dispatch:
inputs:
tag:
description: "Tag to publish (e.g. v1.2.1)"
required: true
type: string
permissions:
contents: write
id-token: write
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ inputs.tag }}
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Build release notes
run: |
TAG="${{ inputs.tag }}"
{
echo "# MLSecOps Practical Reference Guide ${TAG}"
echo ""
echo "Public release of the practical reference guide."
echo ""
echo "## Downloads"
echo "- **Documentation:** https://mhaghighian.github.io/MLSecOps/"
echo "- **Source:** this repository (\`chapters-en/\`)"
echo "- **Integrity:** \`SHA256SUMS\` + \`SHA256SUMS.sig\` (see RELEASE-INTEGRITY.md)"
echo "- **Word (optional):** \`python scripts/build-docx.py --render-mermaid\`"
echo ""
echo "## Changelog"
sed -n '/^## \[/,$p' CHANGELOG.md | head -n 40
} > release-notes.md
- name: Generate SHA256SUMS
run: python scripts/generate_release_manifest.py -o SHA256SUMS
- name: Install cosign
uses: sigstore/cosign-installer@v3.7.0
- name: Sign SHA256SUMS (keyless)
run: cosign sign-blob --yes --bundle SHA256SUMS.sigstore.json SHA256SUMS
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ inputs.tag }}
name: MLSecOps Guide ${{ inputs.tag }}
body_path: release-notes.md
draft: true
prerelease: ${{ contains(inputs.tag, '-') }}
files: |
SHA256SUMS
SHA256SUMS.sigstore.json