v0.13.0.1 #27
Workflow file for this run
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: Upload Schema Artifact | |
on: | |
release: | |
types: [ published ] | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
name: Generate and Upload WPGraphQL Schema Artifact | |
services: | |
mariadb: | |
image: mariadb:10 | |
ports: | |
- 3306:3306 | |
env: | |
MYSQL_ROOT_PASSWORD: root | |
# Ensure docker waits for mariadb to start | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup PHP w/ Composer & WP-CLI | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 7.4 | |
extensions: mbstring, intl, bcmath, exif, gd, mysqli, opcache, zip, pdo_mysql | |
coverage: none | |
tools: composer, wp-cli | |
- name: Setup WordPress | |
run: | | |
cp .env.dist .env | |
echo GF_KEY=${{ secrets.GF_KEY }} >> .env | |
composer run install-test-env | |
- name: Generate the Static Schema | |
run: | | |
cd /tmp/wordpress/ | |
# Output: /tmp/schema.graphql | |
wp graphql generate-static-schema | |
- name: Upload schema as release artifact | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: /tmp/schema.graphql |