Skip to content

Commit

Permalink
update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Ylarod committed Jul 20, 2023
1 parent 00108d0 commit 089ad83
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ jobs:
data: { tag_name: ver }
} = releaseResponse;
if (ver == '${{ steps.pullFridaLatestRelease.outputs.FRIDA_VERSION }}'){
core.setOutput('ALREADY_RELEASE', '1');
if ( ${{ ( github.event_name == 'push' || github.event_name == 'workflow_dispatch') }}){
core.setOutput('ALREADY_RELEASE', '2');
} else {
core.setOutput('ALREADY_RELEASE', '1');
}
}
else{
core.setOutput('ALREADY_RELEASE', '0');
Expand All @@ -71,11 +75,19 @@ jobs:
core.setFailed(e.message);
}
}
- name: Delete release
if: ${{ steps.checkReleaseVersion.outputs.ALREADY_RELEASE == '2' }}
uses: dev-drprasad/[email protected]
with:
tag_name: ${{ steps.pullFridaLatestRelease.outputs.FRIDA_VERSION }}
github_token: ${{ secrets.GITHUB_TOKEN }}
delete_release: true

create_release:
needs: check_version
runs-on: ubuntu-22.04
if: needs.check_version.outputs.ALREADY_RELEASE == '0'
if: needs.check_version.outputs.ALREADY_RELEASE != '1'

steps:
- uses: actions/create-release@master
Expand Down

0 comments on commit 089ad83

Please sign in to comment.