mirror of
				https://github.com/ButlerLogic/action-autotag.git
				synced 2025-10-31 07:16:25 +07:00 
			
		
		
		
	Updated license
This commit is contained in:
		| @ -104,4 +104,5 @@ If you are building an action that runs after this one, be aware this action pro | ||||
| 1. `tagname` will be empty if no tag was created, or it will be the value of the new tag. | ||||
| 1. `tagsha`: The SHA of the new tag. | ||||
| 1. `taguri`: The URI/URL of the new tag reference. | ||||
| 1. `tagmessage`: The messge applied to the tag reference (this is what shows up on the tag screen on Github). | ||||
| 1. `version` will be the version attribute found in the `package.json` file. | ||||
							
								
								
									
										12
									
								
								lib/main.js
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								lib/main.js
									
									
									
									
									
								
							| @ -56,7 +56,7 @@ async function run() { | ||||
|     let tagName = pkg.version | ||||
|     const tagPrefix = core.getInput('tag_prefix', { required: false }) | ||||
|     const tagSuffix = core.getInput('tag_suffix', { required: false }) | ||||
|     const tagMsg = core.getInput('tag_message', { required: false }).trim() | ||||
|     let tagMsg = core.getInput('tag_message', { required: false }).trim() | ||||
|  | ||||
|     tagName = `${tagPrefix}${tagName}${tagSuffix}` | ||||
|  | ||||
| @ -81,13 +81,15 @@ async function run() { | ||||
|     let newTag | ||||
|  | ||||
|     try { | ||||
|       tagMsg = tagMsg.trim().length > 0 | ||||
|         ? tagMsg | ||||
|         : `Version ${pkg.version}` | ||||
|  | ||||
|       newTag = await git.git.createTag({ | ||||
|         owner, | ||||
|         repo, | ||||
|         tag: tagName, | ||||
|         message: tagMsg.trim().length > 0 | ||||
|           ? tagMsg | ||||
|           : `Version ${pkg.version}`, | ||||
|         message: tagMsg, | ||||
|         object: process.env.GITHUB_SHA, | ||||
|         type: 'commit' | ||||
|       }) | ||||
| @ -126,12 +128,14 @@ async function run() { | ||||
|       core.setOutput('tagname', tagName) | ||||
|       core.setOutput('tagsha', newTag.data.sha) | ||||
|       core.setOutput('taguri', newReference.data.url) | ||||
|       core.setOutput('tagmessage', tagMsg.trim()) | ||||
|     } | ||||
|   } catch (error) { | ||||
|     core.warning(error.message) | ||||
|     core.setOutput('tagname', '') | ||||
|     core.setOutput('tagsha', '') | ||||
|     core.setOutput('taguri', '') | ||||
|     core.setOutput('tagmessage', '') | ||||
|   } | ||||
| } | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Corey Butler
					Corey Butler