Skip to content
Open
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
81 changes: 81 additions & 0 deletions .github/workflows/build-and-deploy-to-wordpress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Deploy to WordPress.org

# Useful documentation on the 10up example we base this off: https://github.com/10up/action-wordpress-plugin-deploy/blob/develop/README.md

on:
push:
branches:
- main # Trigger on push to main branch
tags:
- 'v*' # Trigger on version tags, e.g., v1.0.0

jobs:
deploy_to_wp_repository:

# The proper name for the job being run.
name: Deploy to WP.org

runs-on: ubuntu-latest

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

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'

- name: Execute build script
run: |
chmod +x build.sh
./build.sh
- name: WordPress Plugin Deploy

# You can add unique ids to specific steps if you want to reference their output later in the workflow.
#
# Here, this unique identifier lets us use the output from the action to get the zip-path later.
id: deploy

# The use statement lets us pull in the work done by 10up to deploy the plugin to the WordPress repository.
uses: 10up/action-wordpress-plugin-deploy@stable

# Steps can also provide arguments, so this configures 10up's action to also generate a zip file.
with:
generate-zip: true

# Steps can also set environment variables which can be configured in the Github settings for the
# repository. Here, we are using action secrets SVN_USERNAME, SVN_PASSWORD, and PLUGIN_SLUG which
# authenticate with WordPress and lets the action deploy our plugin to the repository.
#
# To learn more about setting and using secrets with Github Actions, check out: https://docs.github.com/en/actions/security-guides/encrypted-secrets?tool=webui#about-encrypted-secrets
env:
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}

# After the deploy, we also want to create a zip and upload it to the release on Github. We don't want
# users to have to go to the repository to find our plugin :).
- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
# Note, this is an exception to action secrets: GH_TOKEN is always available and provides access to
# the current repository this action runs in.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

with:
# Get the URL for uploading assets to the current release.
upload_url: ${{ github.event.release.upload_url }}

# Provide the path to the file generated in the previous step using the output.
asset_path: ${{ steps.deploy.outputs.zip-path }}

# Provide what the file should be named when attached to the release (plugin-name.zip)
asset_name: tako-data-visualization.zip

# Provide the file type.
asset_content_type: application/zip

- name: Clean up
if: always()
run: rm -f tako_plugin.zip

13 changes: 11 additions & 2 deletions tako/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Contributors: jintako
Tags: data visualization
Requires at least: 4.7
Tested up to: 5.9.3
Tested up to: 6.4.3
Stable tag: 1.0
Requires PHP: 7.0
License: GPLv3
Expand All @@ -19,4 +19,13 @@ Q: Do I need to register on trytako.com to use this plugin?
A: Registration is not necessary, but enterprise users will need to login to
access themes and other data specific to the enterprise account.

For support or additional questions, please reach out to hello@trytako.com.
For support or additional questions, please reach out to hello@trytako.com.

== Changelog ==

= 1.0 =
- Initial release. Allows embedding of responsive data-driven visualizations from Tako.
- Tested up to WordPress 5.9.3.

= 1.1 =
- Tested on WordPress versions up to 6.4.3.