Removed jquery dependency #2
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 artifact | |
on: | |
pull_request: | |
types: [opened, synchronize, ready_for_review] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
dev-zip: | |
permissions: | |
contents: write | |
pull-requests: write | |
name: Build ZIP and upload | |
if: github.event.pull_request.draft == false && github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name | |
runs-on: ubuntu-latest | |
outputs: | |
branch-name: ${{ steps.retrieve-branch-name.outputs.branch_name }} | |
git-sha-8: ${{ steps.retrieve-git-sha-8.outputs.sha8 }} | |
steps: | |
- name: Check out source files | |
uses: actions/checkout@v2 | |
- name: Setup node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16.15.0 | |
- name: Install Dependencies | |
run: npm install | |
- name: Build zip | |
run: npm run build | |
- name: Create zip | |
run: npm run dist | |
- name: Retrieve branch name | |
id: retrieve-branch-name | |
run: echo "::set-output name=branch_name::$(REF=${GITHUB_HEAD_REF:-$GITHUB_REF} && echo ${REF#refs/heads/} | sed 's/\//-/g')" | |
- name: Retrieve git SHA-8 string | |
id: retrieve-git-sha-8 | |
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)" | |
- name: Pull request artifacts | |
uses: gavv/pull-request-artifacts@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GIT_SECRET_TOKEN }} | |
with: | |
# Commit hash that triggered PR | |
commit: ${{ github.event.pull_request.head.sha }} | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
artifacts-branch: artifacts | |
artifacts: | | |
artifact/faq-block-for-gutenberg.zip |