mirror of
				https://github.com/pnpm/action-setup.git
				synced 2025-11-04 11:48:19 +08:00 
			
		
		
		
	Enable post action
This commit is contained in:
		@@ -26,3 +26,4 @@ inputs:
 | 
			
		||||
runs:
 | 
			
		||||
  using: node12
 | 
			
		||||
  main: dist/index.js
 | 
			
		||||
  post: dist/index.js
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@@ -1,10 +1,13 @@
 | 
			
		||||
import { setFailed } from '@actions/core'
 | 
			
		||||
import { setFailed, saveState, getState } from '@actions/core'
 | 
			
		||||
import getInputs from './inputs'
 | 
			
		||||
import setOutputs from './outputs'
 | 
			
		||||
import installPnpm from './install-pnpm'
 | 
			
		||||
import pnpmInstall from './pnpm-install'
 | 
			
		||||
 | 
			
		||||
async function main() {
 | 
			
		||||
  const isPost = getState('is_post')
 | 
			
		||||
  if (isPost === 'true') return
 | 
			
		||||
  saveState('is_post', 'true')
 | 
			
		||||
  const inputs = getInputs()
 | 
			
		||||
  await installPnpm(inputs)
 | 
			
		||||
  console.log('Installation Completed!')
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user