Skip to content

Commit

Permalink
Add release workflow (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
zaguiini authored Sep 4, 2024
1 parent 2c04bde commit 5789f66
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 5 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: "tagged-release"

on:
push:
tags:
- "*"

jobs:
tagged-release:
name: "Tagged Release"
runs-on: "ubuntu-latest"

steps:
- uses: actions/checkout@master
- name: Fetch Tags
run: git fetch --tags --force
- id: tag-message
run: git tag -l --sort=-taggerdate --format='%(contents)' $(git describe --tags $(git branch --show-current))
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- run: npm install
- run: "find . -type f -exec sed -i 's/0.0.0-placeholder/${{ github.ref_name }}/g' {} +"
- run: npm run plugin-zip
- uses: softprops/action-gh-release@v2
with:
body: ${{ steps.tag-message.outputs.stdout }}
files: create-content-model.zip
make_latest: true
2 changes: 1 addition & 1 deletion create-content-model.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Plugin Name: Create Content Model
* Description: Create content models in WP Admin.
* Version: 1.0
* Version: 0.0.0-placeholder
*
* @package content-model
*/
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "create-content-model",
"version": "1.0.0",
"main": ".prettierrc.js",
"version": "0.0.0-placeholder",
"scripts": {
"prepare": "husky",
"dev-server": "npx @wp-now/wp-now start --wp=nightly --skip-browser --blueprint=dev.json",
Expand Down

0 comments on commit 5789f66

Please sign in to comment.