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
Use this template to bootstrap the creation of a JavaScript action.:rocket:
7
+
You can use the GitHub Action to query Nullplatform application build parameter
8
8
9
-
This template includes tests, linting, a validation workflow, publishing, and versioning guidance.
10
-
11
-
If you are new, there's also a simpler introduction. See the [Hello World JavaScript Action](https://github.com/actions/hello-world-javascript-action)
12
-
13
-
## Create an action from this template
14
-
15
-
Click the `Use this Template` and provide the new repo details for your action
16
-
17
-
## Code in Main
9
+
## Code
18
10
19
11
Install the dependencies
20
12
@@ -28,9 +20,9 @@ Run the tests :heavy_check_mark:
28
20
$ npm test
29
21
30
22
PASS ./index.test.js
31
-
✓ throws invalid number (3ms)
32
-
✓ wait 500 ms (504ms)
33
-
✓ test runs (95ms)
23
+
✓ throws invalid asset (3ms)
24
+
✓ creates asset on nullplatform (504ms)
25
+
✓ other test (95ms)
34
26
...
35
27
```
36
28
@@ -66,51 +58,21 @@ See the [toolkit documentation](https://github.com/actions/toolkit/blob/master/R
66
58
67
59
## Package for distribution
68
60
69
-
GitHub Actions will run the entry point from the action.yml. Packaging assembles the code into one file that can be checked in to Git, enabling fast and reliable execution and preventing the need to check in node_modules.
70
-
71
-
Actions are run from GitHub repos. Packaging the action will create a packaged action in the dist folder.
72
-
73
-
Run prepare
74
-
75
-
```bash
76
-
npm run prepare
77
-
```
78
-
79
-
Since the packaged index.js is run from the dist folder.
80
-
81
-
```bash
82
-
git add dist
83
-
```
84
-
85
-
## Create a release branch
86
-
87
-
Users shouldn't consume the action from master since that would be latest code and actions can break compatibility between major versions.
88
-
89
-
Checkin to the v1 release branch
61
+
Update version in ``package.json`` file and then run:
90
62
91
63
```bash
92
-
git checkout -b v1
93
-
git commit -a -m "v1 release"
64
+
npm run update:version
94
65
```
95
66
96
-
```bash
97
-
git push origin v1
98
-
```
99
-
100
-
Note: We recommend using the `--license` option for ncc, which will create a license file for all of the production node modules used in your project.
101
-
102
-
Your action is now published! :rocket:
103
-
104
-
See the [versioning documentation](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md)
105
-
106
67
## Usage
107
68
108
69
You can now consume the action by referencing the v1 branch
109
70
110
71
```yaml
111
-
uses: actions/javascript-action@v1
72
+
uses: nullplatform/github-action-asset@v1
112
73
with:
113
-
milliseconds: 1000
74
+
name: ${{ secrets.NULLPLATFORM_API_KEY }}
75
+
type: docker-image
114
76
```
115
77
116
78
See the [actions tab](https://github.com/actions/javascript-action/actions) for runs of this action! :rocket:
0 commit comments