Skip to content

Commit 4030af1

Browse files
authored
Update docs for new YAML format (#20)
Fixes #15
1 parent e426777 commit 4030af1

File tree

2 files changed

+40
-35
lines changed

2 files changed

+40
-35
lines changed

dotorg-plugin-asset-update/README.md

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,27 @@ Secrets can be set while editing your workflow or in the repository settings. Th
1818
* `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.
1919
* `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`)
2020

21+
### Known issues
22+
* 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.
23+
2124
## Example Workflow File
2225
```
23-
workflow "Plugin Asset Update" {
24-
resolves = ["WordPress Plugin Asset Update"]
25-
on = "push"
26-
}
27-
28-
# Filter for master branch
29-
action "branch" {
30-
uses = "actions/bin/filter@master"
31-
args = "branch master"
32-
}
33-
34-
action "WordPress Plugin Asset Update" {
35-
needs = ["branch"]
36-
uses = "10up/actions-wordpress/dotorg-plugin-asset-update@master"
37-
secrets = ["SVN_USERNAME", "SVN_PASSWORD"]
38-
}
26+
name: Plugin asset/readme update
27+
on:
28+
push:
29+
branches:
30+
- master
31+
jobs:
32+
master:
33+
name: Push to master
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@master
37+
- name: WordPress.org plugin asset/readme update
38+
uses: 10up/actions-wordpress/dotorg-plugin-asset-update@master
39+
env:
40+
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
41+
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
3942
```
4043

4144
## Contributing

dotorg-plugin-deploy/README.md

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,29 @@ Secrets can be set while editing your workflow or in the repository settings. Th
1616
* `VERSION` - defaults to the tag name; do not recommend setting this except for testing purposes
1717
* `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`)
1818

19+
### Known issues
20+
* 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: - *`.
21+
1922
## Example Workflow File
2023
```
21-
workflow "Deploy" {
22-
resolves = ["WordPress Plugin Deploy"]
23-
on = "push"
24-
}
25-
26-
# Filter for tag
27-
action "tag" {
28-
uses = "actions/bin/filter@master"
29-
args = "tag"
30-
}
31-
32-
action "WordPress Plugin Deploy" {
33-
needs = ["tag"]
34-
uses = "10up/actions-wordpress/dotorg-plugin-deploy@master"
35-
secrets = ["SVN_USERNAME", "SVN_PASSWORD", "GITHUB_TOKEN"]
36-
env = {
37-
SLUG = "my-super-cool-plugin"
38-
}
39-
}
24+
name: Deploy to WordPress.org
25+
on:
26+
push:
27+
branches:
28+
- refs/tags/*
29+
jobs:
30+
tag:
31+
name: New tag
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@master
35+
- name: WordPress Plugin Deploy
36+
uses: 10up/actions-wordpress/dotorg-plugin-deploy@master
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
40+
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
41+
SLUG: my-super-cool-plugin
4042
```
4143

4244
## Contributing

0 commit comments

Comments
 (0)