Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👷 Updating to listen to releases for publishing to production #42

Merged
merged 9 commits into from
Jul 31, 2024
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
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