Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workflow to test release packages #90

Merged
merged 5 commits into from
Oct 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,42 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
with:
files: ddns-bunny.net-*.zip

test-release:
strategy:
matrix:
rid: [
linux-x64, linux-arm64,
win-x64, osx-x64,
]
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
with:
latest: true
fileName: ddns-bunny.net-${{ github.ref_name }}-${{ matrix.rid }}.zip
extract: true
out-file-path: release
- name: Test Release Package
id: testReleasePackage
run: |
cd release; ls
count=$(ls | wc -l)
if [ $count -ne $EXPECTED_COUNT ]; then
echo "Expected $EXPECTED_COUNT files, found $count"
exit 1
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 }}
Loading