Skip to content

Commit

Permalink
GitHub Actions: Build Plugin zip, store as artifact on every PR (#26746)
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham authored Nov 20, 2020
1 parent 974906b commit c06d7a1
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/build-plugin-zip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build Gutenberg Plugin Zip

on:
pull_request:
paths-ignore:
- '**.md'
push:
branches: [master]
paths-ignore:
- '**.md'

jobs:
build:
name: Build Release Artifact
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master

- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x

- name: Build Gutenberg plugin ZIP file
run: ./bin/build-plugin-zip.sh
env:
NO_CHECKS: 'true'

- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: gutenberg-plugin
path: ./gutenberg.zip

0 comments on commit c06d7a1

Please sign in to comment.