github-actions

Fetch Draft Release ID using Tag

Purpose

During the workflow creating a Draft release is necessary, but there is no simple method to return it. Since we are calling the API and we are returning information that can be used later, we might as well make it available.

Input Parameters

Outputs

Example

       - name: Check out the repo
         uses: actions/checkout@v2

       - name: Tests
         id: tag_version
         uses: DFE-Digital/github-actions/DraftReleaseByTag@master
         with:
           TAG: x1
           TOKEN: $
       
       - name: Print
         if:   steps.tag_version.outputs.release_id 
         run:  |
               echo ID $
               echo NAME $
               echo BODY $