Giter VIP home page Giter VIP logo

varunsridharan / action-wp-org-deploy Goto Github PK

View Code? Open in Web Editor NEW
11.0 2.0 2.0 61 KB

Github Action To Publish WordPress.org Plugin's Update

Home Page: https://github.com/marketplace/actions/wordpress-org-deploy

License: MIT License

Dockerfile 5.27% Shell 94.73%
wp wp-plugin wp-theme wp-developers wordpress-plugin wordpress-theme wordpress-development wordpress deployment release-automation

action-wp-org-deploy's Introduction

WordPress.org Plugin Deploy - Github Action

This Action commits the contents of your Git tag to the WordPress.org plugin repository using the same tag name. It excludes Git-specific items or files and directories as optionally defined in your .wporgignore file, and moves anything from a .wordpress-org subdirectory to the top-level assets directory in Subversion (plugin banners, icons, and screenshots).

Configuration

Required secrets

  • WORDPRESS_USERNAME
  • WORDPRESS_PASSWORD
  • GITHUB_TOKEN - you do not need to generate one but you do have to explicitly make it available to the Action

Secrets can be set while editing your workflow or in the repository settings. They cannot be viewed once stored. GitHub secrets documentation

Optional environment variables

  • SLUG - defaults to the respository name, customizable in case your WordPress repository has a different slug. This should be a very rare case as WordPress assumes that the directory and initial plugin file have the same slug.
  • VERSION - defaults to the tag name; do not recommend setting this except for testing purposes
  • ASSETS_DIR - defaults to .wordpress-org, customizable for other locations of WordPress.org plugin repository-specific assets that belong in the top-level assets directory (the one on the same level as trunk)
  • IGNORE_FILE - defaults to .wporgignore, customizable for other locations of list of files to be ignore like .gitignore
  • ASSETS_IGNORE_FILE - defaults to .wporgassetsignore, customizable for other locations of list of files to be ignore like .gitignore
  • DIST_LOCATION - defaults to ./dist/, option to save final zip files.

Excluding files from deployment

If there are files or directories to be excluded from deployment, such as tests or editor config files, they can be specified in your .wporgignore file. If you use this method, please be sure to include the following items:

# Directories
.wordpress-org
.github

# Files
/.gitattributes
/.gitignore

โš ๏ธ Note: You Should Provide Github Token. If Not No Updated File Will Be Committed & Pushed

Example Workflow File

name: Deploy to WordPress.org
on:
  push:
    branches:
    - refs/tags/*
jobs:
  tag:
    name: New tag
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: WordPress Plugin Deploy
      uses: varunsridharan/action-wp-org-deploy@master
      with:
        WORDPRESS_PASSWORD: ${{ secrets.WORDPRESS_PASSWORD }}
        WORDPRESS_USERNAME: ${{ secrets.WORDPRESS_USERNAME }}
        SLUG: my-super-cool-plugin
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Credits

This Github Action Bootstrapped From


Change Log

1.3 - 29/04/2020

  • Added Custom Arg To Provide Path To Save Dist File.

1.2 - 29/04/2020

  • Improved Logging

1.1 - 06/09/2019

  • Added Option To Exclude Files When Updating Assets Folder.

1.0 - 24/08/2019

  • First Release

Contribute

If you would like to help, please take a look at the list of issues or the To Do checklist.

License

Our GitHub Actions are available for use and remix under the MIT license.

Copyright

2017 - 2018 Varun Sridharan, varunsridharan.in

If you find it useful, let me know ๐Ÿ˜‰

You can contact me on Twitter or through my email.

Backed By

DigitalOcean JetBrains Tidio Chat

action-wp-org-deploy's People

Contributors

varunsridharan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

andy-emre

action-wp-org-deploy's Issues

master branch EOL

Due to changes into the branches management, the master branch is not longer supported and will be removed in 1 month (EOL: 2020-11-28).

After a search, here is the list of projects who use master branch for this action inside their workflows.

##[error]Docker run failed with exit code 2

Hi,
I tried to use this action to deploy a WP plugin but unfortunately, it's failing.

A trunk/lang/etc A trunk/.DS_Store A trunk/README.md A trunk/functions.php A trunk/readme.txt A trunk/retc to revision 22047XX. โžค Copying files... โ„น๏ธŽ Using .gitattributes fatal: not a git repository (or any parent up to mount point /github) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). fatal: not a git repository (or any parent up to mount point /github) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). tar: This does not look like a tar archive tar: Exiting with failure status due to previous errors ##[error]Docker run failed with exit code 2

The error is not very helpful and not sure what will it trigger that.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.