diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 19fa3d8..6c5e613 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,11 +17,8 @@ jobs: run: echo "chown -R $USER $GITHUB_WORKSPACE" && sudo chown -R $USER $GITHUB_WORKSPACE # https://github.com/actions/checkout/blob/v3/README.md - # fetch-tags defauls to false - name: Check out code uses: actions/checkout@v3 - with: - fetch-tags: true - name: Prepare release body run: | @@ -51,6 +48,8 @@ jobs: run: | if [[ $GITHUB_EVENT_NAME == 'schedule' ]]; then # Determine if a given tag exists and matches a specific Git commit. + # actions/checkout@v3 fetch-tags doesn't work when triggered by schedule + git fetch --tags if [ "$(git rev-parse -q --verify "refs/tags/$RELEASE_TAG")" = "$GITHUB_SHA" ]; then echo "mutalbe tag $RELEASE_TAG exists and matchs $GITHUB_SHA" else