File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change 6767 });
6868 console.log(`Published draft release for tag ${tag}`);
6969
70+ - name : Fetch upload_url for this tag
71+ id : get_release
72+ if : steps.tag-action.outputs.tag != ''
73+ uses : actions/github-script@v6
74+ with :
75+ github-token : ${{ secrets.GITHUB_TOKEN }}
76+ result-encoding : string
77+ script : |
78+ const tag = '${{ steps.tag-action.outputs.tag }}';
79+ const { data: release } = await github.rest.repos.getReleaseByTag({
80+ owner: context.repo.owner,
81+ repo: context.repo.repo,
82+ tag
83+ });
84+ return release.upload_url;
85+
7086 - name : Checkout
7187 uses : actions/checkout@v3
7288 if : (steps.tag-action.outputs.tag != '')
@@ -135,7 +151,7 @@ jobs:
135151 - name : Upload SBOM asset
136152 uses : actions/upload-release-asset@v1
137153 with :
138- upload_url : ${{ steps.get_release.outputs.upload_url }}
154+ upload_url : ${{ steps.get_release.outputs.result }}
139155 asset_path : ${{ steps.derive-artifact-name.outputs.SBOM_DIR }}/${{ steps.derive-artifact-name.outputs.SBOM_ARTIFACT_NAME }}
140156 asset_name : ${{ steps.derive-artifact-name.outputs.SBOM_ARTIFACT_NAME }}
141157
You can’t perform that action at this time.
0 commit comments