Merge branch 'main' into release/v2

* main:
  Prepare for release 2.26.0.
  Bump @actions/core from 1.6.0 to 1.9.1 (#262)
  Add action types (#257)
  Update documentation (#255)
This commit is contained in:
Yang
2022-09-20 15:35:23 +10:00
102 changed files with 4712 additions and 23 deletions
+24 -1
View File
@@ -309,4 +309,27 @@ outputs:
runs:
using: 'node12'
main: 'dist/index.js'
```
```
#### Filesystem path helpers
You can use these methods to manipulate file paths across operating systems.
The `toPosixPath` function converts input paths to Posix-style (Linux) paths.
The `toWin32Path` function converts input paths to Windows-style paths. These
functions work independently of the underlying runner operating system.
```js
toPosixPath('\\foo\\bar') // => /foo/bar
toWin32Path('/foo/bar') // => \foo\bar
```
The `toPlatformPath` function converts input paths to the expected value on the runner's operating system.
```js
// On a Windows runner.
toPlatformPath('/foo/bar') // => \foo\bar
// On a Linux runner.
toPlatformPath('\\foo\\bar') // => /foo/bar
```