Skip to content

Commit 73b9a57

Browse files
update readme
1 parent 8712ed4 commit 73b9a57

1 file changed

Lines changed: 22 additions & 2 deletions

File tree

README.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
:rocket: Use this template to bootstrap the creation of a JavaScript action with tests, linting, a validation workflow and publishing.
44

5+
This walk through takes you through creation, testing and publishing the action.
6+
57
## Create an action from this template
68

79
Click the `Use this Template` and provide the new repo details for your action
@@ -55,23 +57,41 @@ See the [toolkit documentation](https://github.com/actions/toolkit/blob/master/R
5557

5658
## Publish to a distribution branch
5759

58-
Comment out node_modules in .gitignore
60+
Actions are run from GitHub repos. We will create a releases branch and only checkin production modules (core in this case).
61+
62+
Comment out node_modules in .gitignore and create a releases/v1 branch
5963
```bash
6064
# Dependency directories
6165
# node_modules/
6266
```
6367

6468
```bash
6569
$ git checkout -b releases/v1
70+
$ git commit -a -m "prod dependencies"
6671
```
6772

6873
```bash
6974
$ npm prune --production
75+
$ git add node_modules/
76+
$ git commit -a -m "prod dependencies"
77+
$ git push origin releases/v1
78+
```
79+
80+
See the [versioning documentation](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md)
81+
82+
## Validate
83+
84+
You can now validate the action by referencing the releases/v1 branch
85+
86+
```yaml
87+
uses: actions/javascript-action@releases/v1
88+
with:
89+
milliseconds: 1000
7090
```
7191
7292
## Usage:
7393
74-
The uses path will be the org and repo where you create your action
94+
After testing you can [create a v1 tag](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md) to reference the stable and tested action
7595
7696
```yaml
7797
uses: actions/javascript-action@v1

0 commit comments

Comments
 (0)