Skip to content

Commit

Permalink
CI: only delete before build
Browse files Browse the repository at this point in the history
  • Loading branch information
sqzw-x committed Apr 10, 2024
1 parent 57ce07f commit 28432b1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Delete old release
uses: dev-drprasad/delete-tag-and-release@v1.1
if: ${{ env.IS_DAILY=='true' }}
with:
tag_name: daily_release
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Get new commits
id: get-new-commits
run: |
echo "count=$(git log --oneline --since '24 hours ago' | wc -l)" >> $GITHUB_OUTPUT
echo "short_sha=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_OUTPUT
- name: Delete old release
uses: dev-drprasad/delete-tag-and-release@v1.1
if: ${{ env.IS_DAILY=='true' && steps.get-new-commits.outputs.count>0 }}
with:
tag_name: daily_release
github_token: ${{ secrets.GITHUB_TOKEN }}

# https://github.com/actions/runner/issues/1985#issuecomment-1573518052
- name: Set matrix
id: set-matrix
Expand Down

0 comments on commit 28432b1

Please sign in to comment.