release with download url
This commit is contained in:
		| @@ -20,16 +20,22 @@ on: | ||||
|       txtFileName: | ||||
|         required: false | ||||
|         type: string | ||||
|     outputs: | ||||
|       downloadUrl: | ||||
|         description: "Url to Download the file" | ||||
|         value: ${{ jobs.DeployToWebserver.outputs.downloadUrl }} | ||||
| jobs: | ||||
|   DeployToWebserver: | ||||
|     runs-on: ubuntu-latest | ||||
|     outputs: | ||||
|       downloadUrl: ${{ steps.Upload.outputs.downloadUrl }} | ||||
|     steps: | ||||
|       - name: Load Artifact | ||||
|         uses: actions/download-artifact@v3 | ||||
|         with: | ||||
|           name: ${{ inputs.artifactName }} | ||||
|           path: ./ | ||||
|       - name: Upload | ||||
|       - id: Upload | ||||
|         run: | | ||||
|           upload_name=${{ inputs.fileName }} | ||||
|  | ||||
| @@ -52,4 +58,6 @@ jobs: | ||||
|             echo "No additional text file to upload." | ||||
|           fi | ||||
|  | ||||
|           downloadUrl="${{ vars.WEB_DEPLOY_URL }}${{ inputs.dir }}/$upload_name" | ||||
|           echo "downloadUrl=$downloadUrl" >> $GITHUB_OUTPUT | ||||
|           echo "Deploy upload done" | ||||
| @@ -11,6 +11,9 @@ on: | ||||
|       repo:  | ||||
|         required: true | ||||
|         type: string | ||||
|       downloadUrl:  | ||||
|         required: false | ||||
|         type: string | ||||
|       artifactName:  | ||||
|         required: false | ||||
|         type: string | ||||
| @@ -63,11 +66,11 @@ jobs: | ||||
|           if [ "$update_milestone_id" != "null" ]; then | ||||
|             echo "Milestone named '${{ inputs.milestoneName }}' found with id $update_milestone_id." | ||||
|  | ||||
|             description="https://gitea.greyhound-software.com/$OWNER/${{ inputs.repo }}/milestone/$update_milestone_id" | ||||
|             milestoneUrl="https://gitea.greyhound-software.com/$OWNER/${{ inputs.repo }}/milestone/$update_milestone_id" | ||||
|  | ||||
|             release_update=$(curl -s -X PATCH -H "Authorization: token $API_TOKEN" \ | ||||
|               -H "Content-Type: application/json" \ | ||||
|               -d "{\"body\": \"$description\", \"name\": \"${{ inputs.milestoneName }}\"}" \ | ||||
|               -d "{\"body\": \"$milestoneUrl \n${{ inputs.downloadUrl }}\", \"name\": \"${{ inputs.milestoneName }}\"}" \ | ||||
|               "$GITEA_API_URL/repos/$OWNER/${{ inputs.repo }}/releases/$release_id") | ||||
|           fi | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user