fix(workflow): correct release existence check and add debug output
Refactored the release existence check to return a simple boolean
string ('true'/'false') rather than an object. Added a step to print
the release existence status for debugging purposes. This ensures
correct conditional evaluation and aids in troubleshooting workflow
issues.
			
			
This commit is contained in:
		
							parent
							
								
									c1127051d4
								
							
						
					
					
						commit
						051042f593
					
				
							
								
								
									
										9
									
								
								.github/workflows/release-on-tag.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										9
									
								
								.github/workflows/release-on-tag.yml
									
									
									
									
										vendored
									
									
								
							| @ -21,18 +21,21 @@ jobs: | ||||
|                 repo: context.repo.repo, | ||||
|                 tag: context.ref.replace('refs/tags/', ''), | ||||
|               }) | ||||
|               return { release_exists: 'true' } | ||||
|               return 'true' | ||||
|             } catch (error) { | ||||
|               if (error.status === 404) { | ||||
|                 return { release_exists: 'false' } | ||||
|                 return 'false' | ||||
|               } else { | ||||
|                 throw error | ||||
|               } | ||||
|             } | ||||
|           result-encoding: string | ||||
| 
 | ||||
|       - name: Print release_exists output | ||||
|         run: echo "release_exists is ${{ steps.check_release.outputs.result }}" | ||||
| 
 | ||||
|       - name: Create Release | ||||
|         if: steps.check_release.outputs.release_exists == 'false' | ||||
|         if: steps.check_release.outputs.result == 'false' | ||||
|         uses: actions/create-release@v1 | ||||
|         with: | ||||
|           tag_name: ${{ github.ref_name }} | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Yidi
						Yidi