Skip to content

Commit

Permalink
Update docs for new YAML format (#20)
Browse files Browse the repository at this point in the history
Fixes #15
  • Loading branch information
helen authored Aug 21, 2019
1 parent e426777 commit 4030af1
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 35 deletions.
35 changes: 19 additions & 16 deletions dotorg-plugin-asset-update/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,27 @@ Secrets can be set while editing your workflow or in the repository settings. Th
* `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
```
workflow "Plugin Asset Update" {
resolves = ["WordPress Plugin Asset Update"]
on = "push"
}
# Filter for master branch
action "branch" {
uses = "actions/bin/filter@master"
args = "branch master"
}
action "WordPress Plugin Asset Update" {
needs = ["branch"]
uses = "10up/actions-wordpress/dotorg-plugin-asset-update@master"
secrets = ["SVN_USERNAME", "SVN_PASSWORD"]
}
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
Expand Down
40 changes: 21 additions & 19 deletions dotorg-plugin-deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,29 @@ Secrets can be set while editing your workflow or in the repository settings. Th
* `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
```
workflow "Deploy" {
resolves = ["WordPress Plugin Deploy"]
on = "push"
}
# Filter for tag
action "tag" {
uses = "actions/bin/filter@master"
args = "tag"
}
action "WordPress Plugin Deploy" {
needs = ["tag"]
uses = "10up/actions-wordpress/dotorg-plugin-deploy@master"
secrets = ["SVN_USERNAME", "SVN_PASSWORD", "GITHUB_TOKEN"]
env = {
SLUG = "my-super-cool-plugin"
}
}
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
Expand Down

0 comments on commit 4030af1

Please sign in to comment.