Skip to content

Commit

Permalink
Update to reflect newly-split repo
Browse files Browse the repository at this point in the history
  • Loading branch information
helen committed Aug 22, 2019
1 parent 291e96e commit acb83f1
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 119 deletions.
20 changes: 6 additions & 14 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,18 @@ The following is a set of guidelines for contributors as well as information and

Contributing isn't just writing code - it's anything that improves the project. All contributions for our GitHub Actions for WordPress are managed right here on GitHub. Here are some ways you can help:

### Reporting bugs
### Reporting bugs and requesting enhancements

If you're running into an issue with the action, please take a look through [existing issues](https://github.com/10up/actions-wordpress/issues) and [open a new one](https://github.com/10up/actions-wordpress/issues/new) if needed. If you're able, include a link to the log output from the failed run.
If you're running into a problem with an action or would like to see it do something more, please open an issue in the repository for that specific action.

### Suggesting enhancements
### Suggesting new actions

New features and enhancements are also managed via [issues](https://github.com/10up/actions-wordpress/issues).
Ideas for future actions can be found in [issues](https://github.com/10up/actions-wordpress/issues).

### Pull requests

Pull requests represent a proposed solution to a specified problem. They should always reference an issue that describes the problem and contains discussion about the problem itself. Discussion on pull requests should be limited to the pull request itself, i.e. code review.

For more on how 10up writes and manages code, check out our [10up Engineering Best Practices](https://10up.github.io/Engineering-Best-Practices/).
Pull requests will likely be uncommon but are welcomed as necessary!

## Workflow

This repository currently only uses the `master` branch, which should always be stable and usable. Releases will be tagged as needed.

## Release instructions

1. [Create a new release](https://github.com/10up/actions-wordpress/releases/new)
2. Ensure it appears in the GitHub Marketplace correctly
3. Celebrate shipping!
This repository currently only actively uses the `master` branch as it is meant to serve as a documentation source. The Action subdirectories in this repository are kept for historical reasons.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# GitHub Actions for WordPress!

Here is a collection of GitHub Actions to help with common needs for WordPress development. Specific documentation for each Action is in the `README.md` file in its subdirectory.
Here is a collection of GitHub Actions to help with common needs for WordPress development. Specific documentation for each Action is in its respective respository. Ideas for future Actions can be found in [issues](https://github.com/10up/actions-wordpress/issues).

[More information about GitHub Actions](https://github.com/features/actions/)

## Ready to use
### [Deploying a plugin to the WordPress.org repository](dotorg-plugin-deploy)
### [Deploying a plugin to the WordPress.org repository](https://github.com/10up/action-wordpress-plugin-deploy)

Whenever you tag a new version of your plugin on GitHub, your changes will be committed to both `trunk` and the appropriate `tags` subfolder in your WordPress.org plugin repository.

### [Deploying plugin asset/readme updates to the WordPress.org repository](dotorg-plugin-asset-update)
### [Deploying plugin asset/readme updates to the WordPress.org repository](https://github.com/10up/action-wordpress-plugin-asset-update)

If you push to your specified branch and it only contains changes to the WordPress.org assets directory (defaults to `/.wordpress-org`) or `readme.txt`, deploy those changes to the WordPress.org plugin repository. This is useful for being able to update things like screenshots or the `Tested up to` version in between tagged releases.

Expand Down
53 changes: 2 additions & 51 deletions dotorg-plugin-asset-update/README.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,5 @@
# WordPress.org Plugin Assets Update

This Action commits any `readme.txt` and WordPress.org-specific assets changes in your specified branch to the WordPress.org plugin repository if no other changes have been made since the last deployment to WordPress.org. This is useful for updating things like screenshots or `Tested up to` separately from functional changes, provided your Git branching methodology avoids changing anything else in the specified branch between functional releases. It is **highly recommended** that you use a stable branch where you only merge readme/asset commits in between larger functional merges that only occur when preparing for a release (often implemented as `master` vs. `develop`).

Because the WordPress.org plugin repository shows information from `readme.txt` in the specified `Stable tag`, this Action also attempts to parse out the stable tag from `readme.txt` and deploy to there as well as `trunk`. If your stable tag is `trunk` or a tag that does not exist in the `tags` subfolder, it will skip that part of the update and only update `trunk` and/or `assets`.

**Important note:** If your development process leads to a situation where `master` (or other specified branch) only contains changes to `readme.txt` or `assets` since the last sync to the plugin directory and those changes are in preparation for the next release, those changes will go live and potentially be misleading to users. Usage of this Action assumes a fairly traditional Git methodology that involves merging all changes to `master` when functional changes are ready and that this seemingly unlikely situation will therefore not happen in your repo; there are no safeguards against syncing changes based on readme/asset content, as that cannot be predicted.

## Configuration

### Required secrets
* `SVN_USERNAME`
* `SVN_PASSWORD`

Secrets can be set while editing your workflow or in the repository settings. They cannot be viewed once stored. [GitHub secrets documentation](https://developer.github.com/actions/creating-workflows/storing-secrets/)

### 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.
* `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`)

### Known issues
* It would be more efficient to additionally use the `paths` filter for the `push` action to reduce the number of runs. So far in testing it is possible to limit it to pushes that include readme/asset files as specified, but not ones that *only* include those files. The Action itself still needs to run as written because it compares the totality of changes in the branch against what's in SVN and not just the contents of the current push.

## Example Workflow File
```
name: Plugin asset/readme update
on:
push:
branches:
- master
jobs:
master:
name: Push to master
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: WordPress.org plugin asset/readme update
uses: 10up/actions-wordpress/dotorg-plugin-asset-update@master
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
```

## Contributing
Want to help? Check out our [contributing guidelines](../CONTRIBUTING.md) to get started.

<p align="center">
<a href="http://10up.com/contact/"><img src="https://10updotcom-wpengine.s3.amazonaws.com/uploads/2016/10/10up-Github-Banner.png" width="850"></a>
</p>

## License

Our GitHub Actions are available for use and remix under the MIT license.
## Moved to https://github.com/10up/action-wordpress-plugin-asset-update

The Action will continue to work as-is in your workflow files; however, we recommend migrating to the new repo for future updates.
2 changes: 2 additions & 0 deletions dotorg-plugin-asset-update/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,5 @@ echo "➤ Committing files..."
svn commit -m "Updating readme/assets from GitHub" --no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD"

echo "✓ Plugin deployed!"

echo "⚠️ Please consider migrating to https://github.com/10up/action-wordpress-plugin-asset-update for the latest version of this Action"
53 changes: 2 additions & 51 deletions dotorg-plugin-deploy/README.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,5 @@
# WordPress.org Plugin Deploy

This Action commits the contents of your Git tag to the WordPress.org plugin repository using the same tag name. It excludes files in `.git` and `.github` subdirectories and moves anything from a `.wordpress-org` subdirectory to the top-level `assets` directory in Subversion (plugin banners, icons, and screenshots).

## Configuration

### Required secrets
* `SVN_USERNAME`
* `SVN_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](https://developer.github.com/actions/creating-workflows/storing-secrets/)

### 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`)

### Known issues
* Currently the `tags` filter on the `push` action does not seem to work correctly, so we target the `refs/tags/*` naming of a branch instead. Ideally for readability and correctness this would use something like `tags: - *`.

## 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: 10up/actions-wordpress/dotorg-plugin-deploy@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SLUG: my-super-cool-plugin
```

## Contributing
Want to help? Check out our [contributing guidelines](../CONTRIBUTING.md) to get started.

<p align="center">
<a href="http://10up.com/contact/"><img src="https://10updotcom-wpengine.s3.amazonaws.com/uploads/2016/10/10up-Github-Banner.png" width="850"></a>
</p>

## License

Our GitHub Actions are available for use and remix under the MIT license.
## Moved to https://github.com/10up/action-wordpress-plugin-deploy

The Action will continue to work as-is in your workflow files; however, we recommend migrating to the new repo for future updates.
2 changes: 2 additions & 0 deletions dotorg-plugin-deploy/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,5 @@ echo "➤ Committing files..."
svn commit -m "Update to version $VERSION from GitHub" --no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD"

echo "✓ Plugin deployed!"

echo "⚠️ Please consider migrating to https://github.com/10up/action-wordpress-plugin-deploy for the latest version of this Action"

0 comments on commit acb83f1

Please sign in to comment.