Merge pull request #23 from OmarEmaraDev/strip-refs-heads
Strip refs/heads/ from the input tag.
This commit is contained in:
		
						commit
						0d3c327d15
					
				@ -9,7 +9,7 @@ You must provide:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
- `repo_token`: Usually you'll want to set this to `${{ secrets.GITHUB_TOKEN }}`.
 | 
					- `repo_token`: Usually you'll want to set this to `${{ secrets.GITHUB_TOKEN }}`.
 | 
				
			||||||
- `file`: A local file to be uploaded as the asset.
 | 
					- `file`: A local file to be uploaded as the asset.
 | 
				
			||||||
- `tag`: The tag to upload into. If you want the current event's tag, use `${{ github.ref }}` (the `refs/tags/` prefix will be automatically stripped).
 | 
					- `tag`: The tag to upload into. If you want the current event's tag or branch name, use `${{ github.ref }}` (the `refs/tags/` and `refs/heads/` prefixes will be automatically stripped).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Optional Arguments
 | 
					Optional Arguments
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -104,7 +104,7 @@ async function run(): Promise<void> {
 | 
				
			|||||||
    // Get the inputs from the workflow file: https://github.com/actions/toolkit/tree/master/packages/core#inputsoutputs
 | 
					    // Get the inputs from the workflow file: https://github.com/actions/toolkit/tree/master/packages/core#inputsoutputs
 | 
				
			||||||
    const token = core.getInput('repo_token', {required: true})
 | 
					    const token = core.getInput('repo_token', {required: true})
 | 
				
			||||||
    const file = core.getInput('file', {required: true})
 | 
					    const file = core.getInput('file', {required: true})
 | 
				
			||||||
    const tag = core.getInput('tag', {required: true}).replace('refs/tags/', '')
 | 
					    const tag = core.getInput('tag', {required: true}).replace('refs/tags/', '').replace('refs/heads/', '')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const file_glob = core.getInput('file_glob') == 'true' ? true : false
 | 
					    const file_glob = core.getInput('file_glob') == 'true' ? true : false
 | 
				
			||||||
    const overwrite = core.getInput('overwrite') == 'true' ? true : false
 | 
					    const overwrite = core.getInput('overwrite') == 'true' ? true : false
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user