File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -87,18 +87,26 @@ jobs:
8787 echo "archive=${archive}" >> "${GITHUB_ENV}"
8888
8989 - name : Upload workflow artifact
90- uses : actions/upload-artifact@v4
90+ uses : actions/upload-artifact@v6
9191 with :
9292 name : ${{ env.artifact_name }}
9393 path : ${{ env.archive }}
9494 if-no-files-found : error
9595
9696 - name : Attach assets to GitHub release
9797 if : env.release_enabled == 'true'
98- uses : softprops/action-gh-release@v2
99- with :
100- tag_name : ${{ env.release_tag }}
101- name : ${{ env.release_tag }}
102- target_commitish : ${{ github.sha }}
103- generate_release_notes : true
104- files : ${{ env.archive }}
98+ env :
99+ GH_TOKEN : ${{ github.token }}
100+ shell : bash
101+ run : |
102+ set -euo pipefail
103+ tag="${{ env.release_tag }}"
104+
105+ if gh release view "${tag}" >/dev/null 2>&1; then
106+ gh release upload "${tag}" "${{ env.archive }}" --clobber
107+ else
108+ gh release create "${tag}" "${{ env.archive }}" \
109+ --title "${tag}" \
110+ --target "${GITHUB_SHA}" \
111+ --generate-notes
112+ fi
You can’t perform that action at this time.
0 commit comments