Skip to content

Commit 5789f66

Browse files
authored
Add release workflow (#112)
1 parent 2c04bde commit 5789f66

File tree

4 files changed

+34
-5
lines changed

4 files changed

+34
-5
lines changed

.github/workflows/release.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: "tagged-release"
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
8+
jobs:
9+
tagged-release:
10+
name: "Tagged Release"
11+
runs-on: "ubuntu-latest"
12+
13+
steps:
14+
- uses: actions/checkout@master
15+
- name: Fetch Tags
16+
run: git fetch --tags --force
17+
- id: tag-message
18+
run: git tag -l --sort=-taggerdate --format='%(contents)' $(git describe --tags $(git branch --show-current))
19+
- uses: actions/setup-node@v4
20+
with:
21+
node-version: 20
22+
cache: 'npm'
23+
- run: npm install
24+
- run: "find . -type f -exec sed -i 's/0.0.0-placeholder/${{ github.ref_name }}/g' {} +"
25+
- run: npm run plugin-zip
26+
- uses: softprops/action-gh-release@v2
27+
with:
28+
body: ${{ steps.tag-message.outputs.stdout }}
29+
files: create-content-model.zip
30+
make_latest: true

create-content-model.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Plugin Name: Create Content Model
44
* Description: Create content models in WP Admin.
5-
* Version: 1.0
5+
* Version: 0.0.0-placeholder
66
*
77
* @package content-model
88
*/

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"name": "create-content-model",
3-
"version": "1.0.0",
4-
"main": ".prettierrc.js",
3+
"version": "0.0.0-placeholder",
54
"scripts": {
65
"prepare": "husky",
76
"dev-server": "npx @wp-now/wp-now start --wp=nightly --skip-browser --blueprint=dev.json",

0 commit comments

Comments
 (0)