-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (69 loc) · 2.39 KB
/
Copy pathrelease.yml
File metadata and controls
78 lines (69 loc) · 2.39 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
name: Attested main-branch archive
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
id-token: write
attestations: write
jobs:
archive-main:
runs-on: ubuntu-latest
steps:
- name: Check out main
uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
- name: Verify module payload
shell: bash
run: |
test -f semantic-webview2.smod
test -f LICENSE.md
test -d semantic
test -d source
test "$(find semantic -type f -name '*.se' | wc -l)" -gt 0
test "$(find semantic -type f -name '*.spz' | wc -l)" -gt 0
test "$(find source -type f | wc -l)" -gt 0
- name: Create main archive
shell: bash
run: |
rm -rf dist staging
mkdir -p staging/semantic-webview2 dist
git archive --format=tar HEAD | tar -xf - -C staging/semantic-webview2
(cd staging && zip -qr "../dist/semantic-webview2-main-${GITHUB_SHA}.zip" semantic-webview2)
sha256sum "dist/semantic-webview2-main-${GITHUB_SHA}.zip" > dist/SHA256SUMS.txt
printf 'commit=%s\n' "$GITHUB_SHA" > dist/MAIN_COMMIT.txt
du -h "dist/semantic-webview2-main-${GITHUB_SHA}.zip"
cat dist/SHA256SUMS.txt
- name: Attest main archive
uses: actions/attest-build-provenance@v2
with:
subject-path: dist/semantic-webview2-main-${{ github.sha }}.zip
- name: Publish main branch release
uses: softprops/action-gh-release@v2
with:
tag_name: main-latest
target_commitish: main
name: Semantic WebView2 main
body: |
Rolling release built from the current `main` branch.
Source commit: `${{ github.sha }}`
The ZIP is attested with GitHub Artifact Attestations.
make_latest: true
files: |
dist/semantic-webview2-main-${{ github.sha }}.zip
dist/SHA256SUMS.txt
dist/MAIN_COMMIT.txt
- name: Upload attested main archive
uses: actions/upload-artifact@v4
with:
name: semantic-webview2-main-${{ github.sha }}
path: |
dist/semantic-webview2-main-${{ github.sha }}.zip
dist/SHA256SUMS.txt
dist/MAIN_COMMIT.txt
if-no-files-found: error
retention-days: 90