diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 997ea522..8fca04f8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,12 +13,15 @@ jobs: Release-Build-and-Upload: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - - name: Fetch Repository Tags + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # Fetch history and all (annotated) tags + - name: Fetch Tag + id: fetchtag run: | + git fetch -f --tags # Fix actions/checkout messing up annotation of the fetched tag: actions/checkout#290 + echo "ISPRERELEASE=$(test tag != $(git cat-file -t $GITHUB_REF_NAME) && echo true || echo false)" >> "$GITHUB_OUTPUT" misc/version.sh - git fetch --unshallow git describe --tags --exact-match 2>/dev/null || git describe git cat-file -t $GITHUB_REF_NAME @@ -38,7 +41,7 @@ jobs: uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: - prerelease: true + prerelease: ${{ steps.fetchtag.outputs.ISPRERELEASE }} files: assets/* body_path: assets.txt