You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22-2Lines changed: 22 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,8 @@
2
2
3
3
:rocket: Use this template to bootstrap the creation of a JavaScript action with tests, linting, a validation workflow and publishing.
4
4
5
+
This walk through takes you through creation, testing and publishing the action.
6
+
5
7
## Create an action from this template
6
8
7
9
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
55
57
56
58
## Publish to a distribution branch
57
59
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
59
63
```bash
60
64
# Dependency directories
61
65
# node_modules/
62
66
```
63
67
64
68
```bash
65
69
$ git checkout -b releases/v1
70
+
$ git commit -a -m "prod dependencies"
66
71
```
67
72
68
73
```bash
69
74
$ 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
70
90
```
71
91
72
92
## Usage:
73
93
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
0 commit comments