diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 46067b4..f7d7103 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,5 +21,18 @@ jobs: uses: softprops/action-gh-release@v1 with: files: release/* + env: + GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} + + - name: Install GitHub CLI + run: sudo apt-get install -y gh + + - name: Update latest Release + run: | + latest_release=$(gh release view latest --json tagName --jq .tagName) || true + if [ -n "$latest_release" ]; then + gh release delete latest -y || true + fi + gh release create latest -t "Latest release" --target ${{ github.ref }} --notes "This is the latest release." env: GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} \ No newline at end of file