- add changeset #65
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: Release Plugin | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18.x | |
cache: npm | |
- 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: π¦ Release Plugin" | |
commit: "release: π¦ Release Plugin" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Check published output | |
run: | | |
echo "Published: ${{ steps.changesets.outputs.published }}" | |
- name: Upload release artifact | |
if: steps.changesets.outputs.published == 'true' | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: "wpgraphql-ide.zip" | |
asset_name: wpgraphql-ide.zip | |
tag: ${{ format('v{0}', fromJSON(steps.changesets.outputs.publishedPackages)[0].version) }} | |
overwrite: true |