Skip to content

Commit

Permalink
chore: add workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
abaicus committed May 17, 2024
1 parent 9c61519 commit ad3f046
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 4 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Tag Release

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
if: "! contains(github.event.head_commit.message, '[skip ci]')"

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'

- name: Install pnpm
run: npm install -g pnpm

- name: Install dependencies, build and tag.
run: |
pnpm install
composer install --prefer-dist --no-progress --no-suggest --ignore-platform-reqs
pnpm run deploy
pnpm run release
env:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
38 changes: 38 additions & 0 deletions .github/workflows/wporg-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Deploy to WordPress.org

on:
workflow_dispatch:
# push:
# tags:
# - "*"

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'

- name: Install pnpm
run: npm install -g pnpm

- name: Install dependencies, build and tag.
run: |
pnpm install
composer install --prefer-dist --no-progress --no-suggest --ignore-platform-reqs
pnpm run deploy
- name: WordPress Theme Deploy
uses: Codeinwp/[email protected]
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USER }}
BUILD_DIR: 'deploy/jadro'


25 changes: 21 additions & 4 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,29 @@
{
"github": {
"release": true,
"github": {
"release": true,
"draft": false,
"changelog": false,
"releaseName": "${version}",
"releaseName": "${version}",
"assets": ["deploy/*.zip"]
},
},
"git": {
"requireCleanWorkingDir": false,
"tagName": "v${version}",
"commitMessage": "Release v${version}",
"pushRepo": "origin",
"push": true
},
"npm": {
"publish": false
},
"hooks": {
"after:release": "echo Successfully released ${name} v${version} to ${repo.repository}."
},
"plugins": {
"version": {
"src": "package.json",
"type": "json",
"path": "version"
}
}
}

0 comments on commit ad3f046

Please sign in to comment.