Skip to content
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
29 changes: 28 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,38 @@ jobs:
QL_VERSION: ${{ inputs.quantlib_version || '1.41' }}

steps:
- uses: actions/checkout@v4

- name: Move tag to current commit
run: |
TAG="v${{ env.QL_VERSION }}"
git tag -f "$TAG"
git push origin "$TAG" --force

- uses: actions/download-artifact@v4
with:
name: "QuantLib-${{ env.QL_VERSION }}-x64-dll"

- name: Create Release
- name: Delete existing release assets
env:
GH_TOKEN: ${{ github.token }}
run: |
TAG="v${{ env.QL_VERSION }}"
echo "Checking for existing release with tag $TAG..."
RELEASE_ID=$(gh api repos/${{ github.repository }}/releases/tags/$TAG \
--jq '.id' 2>/dev/null || true)
if [ -n "$RELEASE_ID" ]; then
echo "Found release $RELEASE_ID — deleting existing assets..."
gh api repos/${{ github.repository }}/releases/$RELEASE_ID/assets \
--jq '.[].id' | while read ASSET_ID; do
echo " Deleting asset $ASSET_ID"
gh api -X DELETE repos/${{ github.repository }}/releases/assets/$ASSET_ID
done
else
echo "No existing release for $TAG — nothing to clean up."
fi

- name: Create or update release
uses: softprops/action-gh-release@v2
with:
tag_name: "v${{ env.QL_VERSION }}"
Expand Down
Loading