-
-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (50 loc) · 2 KB
/
Copy pathrelease.yml
File metadata and controls
60 lines (50 loc) · 2 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
# Release: on a version tag, build the emails, package them, and publish a GitHub
# Release with a signed SLSA build-provenance attestation over the archive.
name: Release
on:
push:
tags: ['v*']
permissions:
contents: read
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write # create the GitHub Release
id-token: write # keyless signing for the provenance attestation
attestations: write # record the build-provenance attestation
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version: 22
cache: npm
- name: Install
run: npm ci
env:
PUPPETEER_SKIP_DOWNLOAD: "true"
- name: Build all outputs
run: |
node framework/build/build.mjs
node framework/build/build.mjs --production --out ../dist/email.min.html
node scripts/build-template.mjs templates/cairn-wellness
node scripts/build-template.mjs templates/ferry-street-brewing
node scripts/build-template.mjs templates/lantern-and-quill
node scripts/build-template.mjs templates/voltline
node scripts/build-template.mjs templates/meridian-advisory
- name: Lint
run: npm run lint
- name: Package release archive
run: |
zip -r "html-email-${GITHUB_REF_NAME}.zip" \
framework examples templates docs README.md LICENSE NOTICE \
-x '*/node_modules/*'
- name: Attest build provenance (SLSA)
uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
with:
subject-path: html-email-${{ github.ref_name }}.zip
- name: Publish GitHub Release
uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3.0.2
with:
files: html-email-${{ github.ref_name }}.zip
generate_release_notes: true