2021-11-14 16:24:17 +09:00
|
|
|
name: 'Build PR'
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
types: ['opened', 'synchronize']
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
PR_NUMBER: ${{github.event.number}}
|
|
|
|
steps:
|
2022-03-08 20:12:31 +09:00
|
|
|
- uses: actions/checkout@v3.0.0
|
2021-11-14 16:24:17 +09:00
|
|
|
- name: Build
|
2022-01-31 00:29:37 +09:00
|
|
|
run: npm ci && npm run build
|
2021-11-14 16:24:17 +09:00
|
|
|
- name: Upload Artifact
|
2022-03-08 20:12:59 +09:00
|
|
|
uses: actions/upload-artifact@v3.0.0
|
2021-11-14 16:24:17 +09:00
|
|
|
with:
|
|
|
|
name: previewbuild
|
|
|
|
path: dist
|
|
|
|
retention-days: 1
|
2022-02-24 11:49:14 +09:00
|
|
|
- uses: actions/github-script@v6.0.0
|
2021-11-14 16:24:17 +09:00
|
|
|
with:
|
|
|
|
script: |
|
|
|
|
var fs = require('fs');
|
|
|
|
fs.writeFileSync('${{github.workspace}}/pr.json', JSON.stringify(context.payload.pull_request));
|
|
|
|
- name: Upload PR Info
|
2022-03-08 20:12:59 +09:00
|
|
|
uses: actions/upload-artifact@v3.0.0
|
2021-11-14 16:24:17 +09:00
|
|
|
with:
|
|
|
|
name: pr.json
|
|
|
|
path: pr.json
|
|
|
|
retention-days: 1
|