Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
AshleyThew committed Nov 29, 2024
1 parent 4baaf61 commit c4e8ba6
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,21 @@ jobs:
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const { owner, repo } = context.repo
await github.repos.deleteRelease({ owner, repo, release_id: 'patreon' })
const { owner, repo } = context.repo;
try {
const release = await github.repos.getReleaseByTag({
owner,
repo,
tag: 'patreon'
});
await github.repos.deleteRelease({
owner,
repo,
release_id: release.data.id
});
} catch (error) {
console.log('No existing release found with tag patreon');
}
- name: Upload Patreon Release
uses: ncipollo/release-action@v1
Expand Down

0 comments on commit c4e8ba6

Please sign in to comment.