forked from lit/lit
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (44 loc) · 1.29 KB
/
release-image.yaml
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
name: Generate Release Image
on:
pull_request:
paths:
- '**/CHANGELOG.md'
push:
paths:
- '**/CHANGELOG.md'
permissions:
contents: read
jobs:
release-image:
if: github.repository == 'lit/lit'
name: Generate Release Image
runs-on: ubuntu-latest
env:
WIREIT_LOGGER: quiet-ci
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
cache: 'npm'
cache-dependency-path: package-lock.json
- uses: google/wireit@setup-github-actions-caching/v2
- name: NPM install
run: npm ci
- name: Build release-image script
working-directory: packages/internal-scripts
run: npm run build
- name: Create release image
env:
BODY: ${{ github.event.pull_request.body }}
run: |
# Store the PR body contents containing the changelog in 'release.md'
echo "$BODY" > release.md
# Only render the pull request content including and after the "#
# Releases" heading.
node_modules/.bin/release-image -m <(sed -n '/# Releases/,$p' release.md)
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: releaseimage
path: release.png