cinny/.github/workflows/build-pull-request.yml
dependabot[bot] 22d8d5a0b8
Bump actions/upload-artifact from 2.3.1 to 3.0.0 (#362)
* Bump actions/upload-artifact from 2.3.1 to 3

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2.3.1 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2.3.1...v3)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Use exact version

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Krishan <33421343+kfiven@users.noreply.github.com>
2022-03-08 16:42:59 +05:30

32 lines
982 B
YAML

name: 'Build PR'
on:
pull_request:
types: ['opened', 'synchronize']
jobs:
build:
runs-on: ubuntu-latest
env:
PR_NUMBER: ${{github.event.number}}
steps:
- uses: actions/checkout@v3.0.0
- name: Build
run: npm ci && npm run build
- name: Upload Artifact
uses: actions/upload-artifact@v3.0.0
with:
name: previewbuild
path: dist
retention-days: 1
- uses: actions/github-script@v6.0.0
with:
script: |
var fs = require('fs');
fs.writeFileSync('${{github.workspace}}/pr.json', JSON.stringify(context.payload.pull_request));
- name: Upload PR Info
uses: actions/upload-artifact@v3.0.0
with:
name: pr.json
path: pr.json
retention-days: 1