Skip to content

Commit

Permalink
Merge pull request #42 from Bynder/feature/GC-5231
Browse files Browse the repository at this point in the history
👷 Updating to listen to releases for publishing to production
  • Loading branch information
CWDN authored Jul 31, 2024
2 parents 4c293f3 + 46a5520 commit 16c6b74
Show file tree
Hide file tree
Showing 6 changed files with 19,589 additions and 25 deletions.
70 changes: 47 additions & 23 deletions .github/workflows/deploy-to-wp-org.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,49 @@
name: Deploy to WordPress.org
name: Deploy to WordPress.org Repository
on:
push:
tags:
- "*"
release:
# run only when a new release is published, but not when it's classified as a pre-release.
types: [released]

jobs:
tag:
name: New tag
runs-on: ubuntu-latest
steps:
# Clone the repo
- uses: actions/checkout@master
# Prepare the release
- run: ls
- run: "composer install --no-dev"
# Release to WordPress.org
- name: WordPress Plugin Deploy
id: deploy
uses: 10up/[email protected]
with:
generate-zip: true
env:
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SLUG: gathercontent-import
deploy_to_wp_repository:
name: Deploy to WP.org
runs-on: ubuntu-latest
steps:

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

- name: Install NodeJS
uses: actions/setup-node@v4
with:
node-version-file: "package.json"
cache-dependency-path: 'package-lock.json'
cache: "npm"

- name: Build
run: |
npm ci --legacy-peer-deps
npm run build
- name: Composer
run: |
composer install --no-dev
- name: WordPress Plugin Deploy
id: deploy
uses: 10up/[email protected]
with:
generate-zip: true
env:
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}

- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ steps.deploy.outputs.zip-path }}
asset_name: ${{ github.event.repository.name }}.zip
asset_content_type: application/zip
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ build/Release

# Dependency directories
node_modules
package-lock.json
jspm_packages

# Optional npm cache directory
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ This plugin relies on the following third-party services:

## Changelog

### 1.0.1 ###
* Updating the plugin listing page to have new assets and an improved description.
* Fixing small typo within the plugin API stopping the plugin from loading.

### 1.0.0 ###

* Officially supporting components by using the Advanced Custom Fields plugins
Expand Down
2 changes: 1 addition & 1 deletion includes/classes/admin/mapping/field-types/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function option_underscore_template( View $view ) {
* We force strip the script tags to avoid as XSS attacks.
* We are unable to use wp_kses as it doesn't handle the <# #> tags correctly and strips the end tag.
*/
echo "\n\t" . preg_replace("/<script.*?\/script>/s", "", $option)
echo "\n\t" . preg_replace("/<script.*?\/script>/s", "", $option);
}

public function underscore_options( $array ) {
Expand Down
Loading

0 comments on commit 16c6b74

Please sign in to comment.