-
Notifications
You must be signed in to change notification settings - Fork 8
72 lines (60 loc) · 1.73 KB
/
Copy pathrelease.yml
File metadata and controls
72 lines (60 loc) · 1.73 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
name: Release
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: Existing release tag to upload/attest (for example, v1.4.1)
required: true
type: string
permissions:
contents: write
attestations: write
id-token: write
jobs:
build-upload-attest:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Use Node.js 20.19.0
uses: actions/setup-node@v5
with:
node-version: 20.19.0
cache: npm
- name: Install dependencies
run: npm ci
- name: Build release assets
run: npm run build
- name: Upload release assets (published event)
if: github.event_name == 'release'
uses: softprops/action-gh-release@v2
with:
files: |
dist/main.js
dist/styles.css
dist/manifest.json
fail_on_unmatched_files: true
- name: Upload release assets (manual)
if: github.event_name == 'workflow_dispatch'
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.event.inputs.tag }}
files: |
dist/main.js
dist/styles.css
dist/manifest.json
fail_on_unmatched_files: true
- name: Attest main.js provenance
uses: actions/attest-build-provenance@v3
with:
subject-path: dist/main.js
- name: Attest styles.css provenance
uses: actions/attest-build-provenance@v3
with:
subject-path: dist/styles.css
- name: Attest manifest.json provenance
uses: actions/attest-build-provenance@v3
with:
subject-path: dist/manifest.json