Merge pull request #140 from gitcoindev/bugfix/audit-dapp-display-all… #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: | |
- development | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: read | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18.14.1" | |
- name: Yarn Install | |
run: yarn install | |
- name: Build | |
run: yarn utils:build | |
- name: Add commit SHA file to build folder | |
run: echo -n $(echo "${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}" | cut -c1-7) > static/commit.txt | |
- name: Prepare Deployment Artifact | |
env: | |
EVENT_NAME: ${{github.event_name}} | |
PR_NUMBER: ${{ github.event.number }} | |
SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} | |
run: | | |
echo "event_name=$EVENT_NAME,pr_number=$PR_NUMBER,sha=$SHA" | |
mkdir -p ./pr | |
echo "event_name=$EVENT_NAME,pr_number=$PR_NUMBER,sha=$SHA," > ./pr/pr_number | |
cd ./static && zip -r ../pr/pull-request.zip ./* | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: pr | |
path: pr/ |