mirror of
https://github.com/pnpm/action-setup.git
synced 2024-11-13 21:33:57 +00:00
Complete source code
This commit is contained in:
parent
7d62586afe
commit
696222a6f3
@ -1,11 +1,13 @@
|
|||||||
import { setFailed } from '@actions/core'
|
import { setFailed } from '@actions/core'
|
||||||
import getInputs from './inputs'
|
import getInputs from './inputs'
|
||||||
|
import setOutputs from './outputs'
|
||||||
import install from './install'
|
import install from './install'
|
||||||
|
|
||||||
const inputs = getInputs()
|
const inputs = getInputs()
|
||||||
|
|
||||||
install(inputs).then(() => {
|
install(inputs).then(() => {
|
||||||
console.log('Installation Completed!')
|
console.log('Installation Completed!')
|
||||||
|
setOutputs(inputs)
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
setFailed(error)
|
setFailed(error)
|
||||||
|
8
src/outputs/index.ts
Normal file
8
src/outputs/index.ts
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import { addPath } from '@actions/core'
|
||||||
|
import { Inputs } from '../inputs'
|
||||||
|
|
||||||
|
export function setOutputs(inputs: Inputs) {
|
||||||
|
addPath(inputs.binDest)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default setOutputs
|
Loading…
Reference in New Issue
Block a user