Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions .dist.env

This file was deleted.

1 change: 0 additions & 1 deletion .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,5 @@ Thumbs.db
src
/src/js
/src/css
vendor
lib
development.md
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

17 changes: 0 additions & 17 deletions .eslintrc.js

This file was deleted.

118 changes: 118 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: Release WordPress Plugin to SVN

on:
push:
tags:
- 'v*.*.*' # Matches version tags like v1.0.0, v2.1.3, etc.

jobs:
build-and-release:
name: Build and Release The Plugin to SVN
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0' # Adjust this to your PHP version if necessary
tools: composer

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '14' # Adjust this to your Node.js version if necessary. Latest node v21.7.1

- name: Install SSH key
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan github.com >> ~/.ssh/known_hosts

- name: Install PHP dependencies
run: |
composer config --global github-protocols ssh
composer install
composer update --no-dev --no-scripts

- name: Install Node.js dependencies
run: npm install

- name: Run build script
run: npm run build

- name: Checkout SVN repository
run: svn checkout ${{ secrets.SVN_REPOSITORY_URL }} svn

- name: Sync files to SVN trunk
run: |
rsync -r --delete --exclude-from='.distignore' --exclude='svn/' ./ svn/trunk/
cd svn
svn add --force trunk
svn commit -m "Release version ${{ github.ref }}" --username ${{ secrets.SVN_USERNAME }} --password ${{ secrets.SVN_PASSWORD }} --no-auth-cache --non-interactive

- name: Sync assets to SVN assets
run: |
mkdir -p svn/assets
rsync -r --delete --include '*/' --include '*.png' --include '*.jpg' --include '*.jpeg' --include '*.gif' --include '*.svg' --exclude '*' .wordpress-org/ svn/assets/
cd svn
svn add --force assets
svn commit -m "Update assets for version ${{ github.ref }}" --username ${{ secrets.SVN_USERNAME }} --password ${{ secrets.SVN_PASSWORD }} --no-auth-cache --non-interactive

- name: Delete existing SVN tag if it exists
run: |
TAG_NAME=${GITHUB_REF#refs/tags/}
TAG_NAME=${TAG_NAME#v}
svn delete ${{ secrets.SVN_REPOSITORY_URL }}/tags/${TAG_NAME} -m "Deleting existing tag ${TAG_NAME}" --username ${{ secrets.SVN_USERNAME }} --password ${{ secrets.SVN_PASSWORD }} --no-auth-cache --non-interactive || true

- name: Create SVN tag # For removing tag: svn delete ${{ secrets.SVN_REPOSITORY_URL }}/tags/${TAG_NAME} -m "Removing unwanted tag ${TAG_NAME}" --username ${{ secrets.SVN_USERNAME }} --password ${{ secrets.SVN_PASSWORD }} --non-interactive
run: |
TAG_NAME=${GITHUB_REF#refs/tags/}
TAG_NAME=${TAG_NAME#v}
cd svn
svn copy ${{ secrets.SVN_REPOSITORY_URL }}/trunk ${{ secrets.SVN_REPOSITORY_URL }}/tags/${TAG_NAME} -m "Tagging version ${TAG_NAME}" --username ${{ secrets.SVN_USERNAME }} --password ${{ secrets.SVN_PASSWORD }} --no-auth-cache --non-interactive

notifications:
needs: build-and-release
runs-on: ubuntu-latest
if: always()

steps:
- name: Send Slack notification on success
if: success()
uses: slackapi/slack-github-action@v1.18.0
with:
payload: |
{
"channel": "#announcements",
"text": "The release of version ${{ github.ref }} was successful.",
"attachments": [
{
"color": "good",
"text": "Release version ${{ github.ref }} has been successfully deployed."
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

- name: Send Slack notification on failure
if: failure()
uses: slackapi/slack-github-action@v1.18.0
with:
payload: |
{
"channel": "#announcements",
"text": "The release of version ${{ github.ref }} failed.",
"attachments": [
{
"color": "danger",
"text": "There was an error in releasing version ${{ github.ref }}. Please check the GitHub Actions logs for details."
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
5 changes: 0 additions & 5 deletions .stylelintrc.json

This file was deleted.

Binary file added .wordpress-org/banner-1544x500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/banner-772x250.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/icon-128x128.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/icon-256x256.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 3 additions & 13 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ module.exports = function( grunt ) {
'*.php',
'**/*.php',
'!node_modules/**',
'!tests/**',
'!vendor/**',
],
},
Expand Down Expand Up @@ -54,7 +53,6 @@ module.exports = function( grunt ) {
'**/*.php',
'!packages/**',
'!node_modules/**',
'!tests/**',
'!vendor/**',
],
expand: true,
Expand All @@ -65,11 +63,10 @@ module.exports = function( grunt ) {
options: {
domainPath: 'languages',
exclude: [ 'packages/*', '.git/*', 'node_modules/*' ],
mainFile: '<%= package.name %>.php',
potFilename: '<%= package.name %>.pot',
mainFile: 'insert-codes.php',
potFilename: 'insert-codes.pot',
potHeaders: {
'report-msgid-bugs-to': '<%= package.homepage %>',
'project-id-version': '<%= package.title %> <%= package.version %>',
'report-msgid-bugs-to': 'https://urldev.com/support',
poedit: true,
'x-poedit-keywordslist': true,
},
Expand All @@ -78,13 +75,6 @@ module.exports = function( grunt ) {
},
},
},
wp_readme_to_markdown: {
your_target: {
files: {
'readme.md': 'readme.txt',
},
},
},
}
);

Expand Down
1 change: 1 addition & 0 deletions assets/css/insertcodes-admin-rtl.css

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

2 changes: 1 addition & 1 deletion assets/css/insertcodes-admin.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array(), 'version' => '4207d7f157ff833c24e3');
<?php return array('dependencies' => array(), 'version' => 'ba6f948e379fb391bec7');
2 changes: 1 addition & 1 deletion assets/css/insertcodes-admin.css

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

Loading