8000 Include @actions/io · deep-soft/github-script@b2c461f · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit b2c461f

Browse files
committed
Include @actions/io
1 parent 048309c commit b2c461f

File tree

6 files changed

+517
-4
lines changed

6 files changed

+517
-4
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ arguments will be provided:
1212
- `context` An object containing the [context of the workflow
1313
run](https://github.com/actions/toolkit/tree/master/packages/github)
1414
- `core` A reference to the [@actions/core](https://github.com/actions/toolkit/tree/master/packages/core) package
15+
- `io` A reference to the [@actions/io](https://github.com/actions/toolkit/tree/master/packages/io) package
1516

1617
Since the `script` is just a function body, these values will already be
1718
defined, so you don't have to (see examples below).

dist/index.js

Lines changed: 505 additions & 2 deletions
Large diffs are not rendered by default.

package-lock.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
},
3737
"dependencies": {
3838
"@actions/core": "^1.2.4",
39-
"@actions/github": "^2.2.0"
39+
"@actions/github": "^2.2.0",
40+
"@actions/io": "^1.0.2"
4041
},
4142
"devDependencies": {
4243
"@types/jest": "^25.1.4",

src/async-function.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
import * as core from '@actions/core'
22
import {GitHub} from '@actions/github'
33
import {Context} from '@actions/github/lib/context'
4+
import * as io from '@actions/io'
45

56
const AsyncFunction = Object.getPrototypeOf(async () => null).constructor
67

78
type AsyncFunctionArguments = {
89
context: Context
910
core: typeof core
1011
github: GitHub
12+
io: typeof io
1113
require: NodeRequire
1214
}
1315

src/main.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as core from '@actions/core'
22
import {context, GitHub} from '@actions/github'
3+
import * as io from '@actions/io'
34
import {callAsyncFunction} from './async-function'
45

56
process.on('unhandledRejection', handleError)
@@ -27,7 +28,7 @@ async function main(): Promise<void> {
2728

2829
// Using property/value shorthand on `require` (e.g. `{require}`) causes compilation errors.
2930
const result = await callAsyncFunction(
30-
{require: require, github, context, core},
31+
{require: require, github, context, core, io},
3132
script
3233
)
3334

0 commit comments

Comments
 (0)
0