Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yuzhichang committed Dec 27, 2023
1 parent 3ded2da commit a663ac3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a663ac3

Please sign in to comment.