Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
exprays committed Jul 6, 2024
1 parent fb117ed commit b7e9254
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,24 @@ jobs:
"orion-macos"
)
# Create release
gh release create ${{ github.ref_name }} \
--title "Release ${{ github.ref_name }}" \
--notes "Release ${{ github.ref_name }}"
# Check if release exists
if gh release view ${{ github.ref_name }} &>/dev/null; then
echo "Release ${{ github.ref_name }} already exists. Updating..."
gh release edit ${{ github.ref_name }} \
--title "Release ${{ github.ref_name }}" \
--notes "Release ${{ github.ref_name }} (updated)"
else
echo "Creating new release ${{ github.ref_name }}..."
gh release create ${{ github.ref_name }} \
--title "Release ${{ github.ref_name }}" \
--notes "Release ${{ github.ref_name }}"
fi
# Upload assets
for asset in "${assets[@]}"; do
gh release upload ${{ github.ref_name }} "$asset"
if [ -f "$asset" ]; then
gh release upload ${{ github.ref_name }} "$asset" --clobber
else
echo "Warning: Asset $asset not found"
fi
done

0 comments on commit b7e9254

Please sign in to comment.