-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (42 loc) · 1.39 KB
/
release-plugin.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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