Skip to content

feat: add support for resolving Template Part blocks (#324) #210

feat: add support for resolving Template Part blocks (#324)

feat: add support for resolving Template Part blocks (#324) #210

Workflow file for this run

name: Release
on:
push:
branches:
- main
jobs:
call-workflow-test-plugin:
uses: ./.github/workflows/test-plugin.yml
release:
services:
mariadb:
image: mariadb:10.8.2
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
name: Release
runs-on: ubuntu-22.04
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Setup Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Install Dependencies
run: npm ci
- name: Create Release Pull Request or Create GitHub Release
id: changesets
uses: changesets/action@v1
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: npm run release
version: npm run version
title: "Release Plugin"
commit: "Release Plugin"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload plugin zip file
if: steps.changesets.outputs.published == 'true'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: "@wpengine/wp-graphql-content-blocks.zip"
asset_name: wp-graphql-content-blocks.zip
tag: ${{ format('v{0}', fromJSON(steps.changesets.outputs.publishedPackages)[0].version) }}
overwrite: true
- name: Setup WordPress to generate static schema
if: steps.changesets.outputs.published == 'true'
uses: ./.github/actions/setup-wordpress
- name: Generate the static schema
if: steps.changesets.outputs.published == 'true'
run: |
cd /tmp/wordpress
# Output: /tmp/schema.graphql
wp graphql generate-static-schema
- name: Upload schema as release artifact
if: steps.changesets.outputs.published == 'true'
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ format('v{0}', fromJSON(steps.changesets.outputs.publishedPackages)[0].version)}}
files: /tmp/schema.graphql
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}