Skip to content

Commit

Permalink
Delete release if not good
Browse files Browse the repository at this point in the history
  • Loading branch information
prplecake committed Oct 11, 2024
1 parent 6c5c888 commit 305d137
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ jobs:
runs-on: ubuntu-latest
name: Test Release (${{matrix.rid}})
needs: publish
permissions:
contents: write
packages: read
steps:
- name: Download release
uses: robinraju/release-downloader@v1
Expand All @@ -108,7 +111,9 @@ jobs:
fileName: ddns-bunny.net-${{ github.ref_name }}-${{ matrix.rid }}.zip
extract: true
out-file-path: release
- run: |
- name: Test Release Package
id: testReleasePackage
run: |
cd release; ls
count=$(ls | wc -l)
if [ $count -ne $EXPECTED_COUNT ]; then
Expand All @@ -117,3 +122,9 @@ jobs:
fi
env:
EXPECTED_COUNT: 5
- name: Delete Release
if: always() $$ (steps.testReleasePackage.outcome == 'failure')
run: |
gh release delete ${{ github.ref_name }} --yes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 305d137

Please sign in to comment.