Skip to content

Commit 66d4284

Browse files
authored
Merge pull request #97 from ucsc/Herm71/issue96
Update `release.yml` to use `ucsc/actions` release workflow
2 parents b5e0b51 + acffb04 commit 66d4284

3 files changed

Lines changed: 75 additions & 56 deletions

File tree

.github/workflows/release.yml

Lines changed: 24 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,33 @@
1+
# Caller workflow — drop this into each consuming repo at:
2+
# .github/workflows/release.yml
3+
#
4+
# Update the `uses` path to match your shared-workflows repo and tag.
5+
# Update `zip-name` to match the package name in that repo's package.json.
6+
17
name: Build and release
28

39
on:
410
push:
511
tags:
6-
- 'v*.*.*'
7-
- 'v*.*.*-rc.*'
8-
12+
- "v*.*.*"
13+
- "v*.*.*-rc.*"
14+
workflow_dispatch:
15+
916
permissions:
1017
contents: write
1118

1219
jobs:
13-
build:
14-
runs-on: ubuntu-latest
15-
16-
steps:
17-
- uses: actions/checkout@v4.2.2
18-
- uses: actions/setup-node@v3.9.1
19-
with:
20-
node-version: 20
21-
cache: 'npm'
22-
23-
- name: Install Composer dependencies
24-
run: |
25-
composer install --optimize-autoloader --ignore-platform-reqs --no-dev
26-
27-
- name: Install Node dependencies
28-
run: npm install
29-
30-
- name: Build plugin assets
31-
run: ./node_modules/.bin/wp-scripts build
32-
33-
- name: Package plugin
34-
run: ./node_modules/.bin/wp-scripts plugin-zip
35-
36-
- name: Release
37-
uses: softprops/action-gh-release@v1
38-
with:
39-
files: ucsc-custom-functionality.zip
40-
generate_release_notes: true
20+
release:
21+
# Point this at your shared repo. Pin to a tag for stability.
22+
uses: ucsc/actions/.github/workflows/release.yml@v1
23+
with:
24+
zip-name: ${{ github.event.repository.name }}.zip
25+
#
26+
# DEFAULTS
27+
# Uncomment the following lines to adjust the defaults:
28+
#
29+
# node-version: '24'
30+
# build-command: 'build'
31+
# use-composer: true
32+
# composer-args: '--no-dev --no-progress --optimize-autoloader'
33+
# generate-release-notes: true

composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"name": "ucsc/custom-functionality",
3+
"description": "UCSC Custom Functionality WordPress Plugin",
4+
"license": "GPL-2.0-or-later",
25
"require-dev": {
36
"wp-coding-standards/wpcs": "^2.2",
47
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.2"

composer.lock

Lines changed: 48 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)