generated from tc39/template-for-proposals
-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (34 loc) · 1.11 KB
/
render-pr.yml
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
name: Render PR
on: [pull_request]
jobs:
render:
runs-on: ubuntu-latest
if: ${{ github.event.pull_request }}
steps:
- uses: actions/checkout@v4
- name: '[node LTS] npm install'
uses: ljharb/actions/node/install@main
with:
node-version: lts/*
- run: npm run build
- name: Save PR data
env:
PR: ${{ github.event.number }}
run: echo "$PR $(git rev-parse --verify HEAD)" > build/pr-data.txt
- uses: actions/upload-artifact@v4
id: upload
if: ${{ !github.event.repository.fork }}
with:
name: result
path: build/
- name: Echo artifact ID
run: echo 'Artifact ID is ${{ steps.upload.outputs.artifact-id }}'
- name: Verify artifact discoverability
uses: actions/github-script@v7
with:
script: |
const { owner, repo } = context.repo;
const run_id = ${{ github.run_id }};
const listArtifactsResponse =
await github.rest.actions.listWorkflowRunArtifacts({ owner, repo, run_id });
console.log(`artifacts for run id ${run_id}`, listArtifactsResponse?.data);