@@ -266,104 +266,104 @@ jobs:
266266 fetch-depth : 0
267267 submodules : recursive
268268
269- - name : Determine MLX version
270- id : mlx_version
271- run : |
272- git submodule update --init --recursive
273- git -C extern/mlx fetch --tags
274-
275- if MLX_TAG=$(git -C extern/mlx describe --tags --abbrev=0 2>/dev/null); then
276- echo "Detected MLX tag: ${MLX_TAG}"
277- else
278- echo "::warning::Unable to determine MLX tag; falling back to commit hash"
279- MLX_TAG="unknown"
280- fi
281-
282- MLX_COMMIT=$(git -C extern/mlx rev-parse --short HEAD)
283-
284- echo "tag=${MLX_TAG}" >> "$GITHUB_OUTPUT"
285- echo "commit=${MLX_COMMIT}" >> "$GITHUB_OUTPUT"
286-
287- - name : Extract version from Directory.Build.props
288- id : version
289- run : |
290- VERSION=$(grep -oP '<Version>\K[^<]+' Directory.Build.props)
291- echo "version=$VERSION" >> $GITHUB_OUTPUT
292- echo "Extracted version: $VERSION"
293-
294- - name : Check if tag exists
295- id : check_tag
296- run : |
297- if git ls-remote --tags origin | grep -q "refs/tags/v${{ steps.version.outputs.version }}"; then
298- echo "exists=true" >> $GITHUB_OUTPUT
299- echo "Tag v${{ steps.version.outputs.version }} already exists"
300- else
301- echo "exists=false" >> $GITHUB_OUTPUT
302- echo "Tag v${{ steps.version.outputs.version }} does not exist"
303- fi
304-
305- - name : Download package artifacts
306- if : steps.check_tag.outputs.exists == 'false'
307- uses : actions/download-artifact@v4
308- with :
309- name : packages
310- path : artifacts/packages
311-
312- - name : Publish to NuGet
313- if : steps.check_tag.outputs.exists == 'false'
314- run : |
315- for package in artifacts/packages/*.nupkg; do
316- echo "Publishing $package..."
317- dotnet nuget push "$package" \
318- --api-key ${{ secrets.NUGET_API_KEY }} \
319- --source https://api.nuget.org/v3/index.json \
320- --skip-duplicate || true
321- done
322-
323- - name : Create Git tag
324- if : steps.check_tag.outputs.exists == 'false'
325- run : |
326- git config user.name "github-actions[bot]"
327- git config user.email "github-actions[bot]@users.noreply.github.com"
328- git tag -a "v${{ steps.version.outputs.version }}" -m "Release v${{ steps.version.outputs.version }}"
329- git push origin "v${{ steps.version.outputs.version }}"
330-
331- - name : Generate release notes
332- if : steps.check_tag.outputs.exists == 'false'
333- id : release_notes
334- env :
335- RELEASE_VERSION : ${{ steps.version.outputs.version }}
336- MLX_TAG : ${{ steps.mlx_version.outputs.tag }}
337- MLX_COMMIT : ${{ steps.mlx_version.outputs.commit }}
338- run : |
339- PREVIOUS_TAG=$(git describe --abbrev=0 --tags $(git rev-list --tags --skip=1 --max-count=1) 2>/dev/null || echo "")
340- if [ -z "$PREVIOUS_TAG" ]; then
341- COMMITS=$(git log --pretty=format:"- %s (%h)" --reverse)
342- else
343- COMMITS=$(git log ${PREVIOUS_TAG}..HEAD --pretty=format:"- %s (%h)" --reverse)
344- fi
345-
346- echo "## What's Changed" > release_notes.md
347- echo "" >> release_notes.md
348- echo "$COMMITS" >> release_notes.md
349- echo "" >> release_notes.md
350- echo "## Upstream MLX" >> release_notes.md
351- echo "- Version: ${MLX_TAG}" >> release_notes.md
352- echo "- Commit: ${MLX_COMMIT}" >> release_notes.md
353- echo "" >> release_notes.md
354- echo "## NuGet Packages" >> release_notes.md
355- echo "- [MLXSharp v${RELEASE_VERSION}](https://www.nuget.org/packages/MLXSharp/${RELEASE_VERSION})" >> release_notes.md
356- echo "- [MLXSharp.SemanticKernel v${RELEASE_VERSION}](https://www.nuget.org/packages/MLXSharp.SemanticKernel/${RELEASE_VERSION})" >> release_notes.md
357-
358- cat release_notes.md
359-
360- - name : Create GitHub Release
361- if : steps.check_tag.outputs.exists == 'false'
362- uses : softprops/action-gh-release@v1
363- with :
364- tag_name : v${{ steps.version.outputs.version }}
365- name : Release v${{ steps.version.outputs.version }}
366- body_path : release_notes.md
367- files : artifacts/packages/*
368- env :
369- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
269+ # - name: Determine MLX version
270+ # id: mlx_version
271+ # run: |
272+ # git submodule update --init --recursive
273+ # git -C extern/mlx fetch --tags
274+ #
275+ # if MLX_TAG=$(git -C extern/mlx describe --tags --abbrev=0 2>/dev/null); then
276+ # echo "Detected MLX tag: ${MLX_TAG}"
277+ # else
278+ # echo "::warning::Unable to determine MLX tag; falling back to commit hash"
279+ # MLX_TAG="unknown"
280+ # fi
281+ #
282+ # MLX_COMMIT=$(git -C extern/mlx rev-parse --short HEAD)
283+ #
284+ # echo "tag=${MLX_TAG}" >> "$GITHUB_OUTPUT"
285+ # echo "commit=${MLX_COMMIT}" >> "$GITHUB_OUTPUT"
286+ #
287+ # - name: Extract version from Directory.Build.props
288+ # id: version
289+ # run: |
290+ # VERSION=$(grep -oP '<Version>\K[^<]+' Directory.Build.props)
291+ # echo "version=$VERSION" >> $GITHUB_OUTPUT
292+ # echo "Extracted version: $VERSION"
293+ #
294+ # - name: Check if tag exists
295+ # id: check_tag
296+ # run: |
297+ # if git ls-remote --tags origin | grep -q "refs/tags/v${{ steps.version.outputs.version }}"; then
298+ # echo "exists=true" >> $GITHUB_OUTPUT
299+ # echo "Tag v${{ steps.version.outputs.version }} already exists"
300+ # else
301+ # echo "exists=false" >> $GITHUB_OUTPUT
302+ # echo "Tag v${{ steps.version.outputs.version }} does not exist"
303+ # fi
304+ #
305+ # - name: Download package artifacts
306+ # if: steps.check_tag.outputs.exists == 'false'
307+ # uses: actions/download-artifact@v4
308+ # with:
309+ # name: packages
310+ # path: artifacts/packages
311+ #
312+ # - name: Publish to NuGet
313+ # if: steps.check_tag.outputs.exists == 'false'
314+ # run: |
315+ # for package in artifacts/packages/*.nupkg; do
316+ # echo "Publishing $package..."
317+ # dotnet nuget push "$package" \
318+ # --api-key ${{ secrets.NUGET_API_KEY }} \
319+ # --source https://api.nuget.org/v3/index.json \
320+ # --skip-duplicate || true
321+ # done
322+ #
323+ # - name: Create Git tag
324+ # if: steps.check_tag.outputs.exists == 'false'
325+ # run: |
326+ # git config user.name "github-actions[bot]"
327+ # git config user.email "github-actions[bot]@users.noreply.github.com"
328+ # git tag -a "v${{ steps.version.outputs.version }}" -m "Release v${{ steps.version.outputs.version }}"
329+ # git push origin "v${{ steps.version.outputs.version }}"
330+ #
331+ # - name: Generate release notes
332+ # if: steps.check_tag.outputs.exists == 'false'
333+ # id: release_notes
334+ # env:
335+ # RELEASE_VERSION: ${{ steps.version.outputs.version }}
336+ # MLX_TAG: ${{ steps.mlx_version.outputs.tag }}
337+ # MLX_COMMIT: ${{ steps.mlx_version.outputs.commit }}
338+ # run: |
339+ # PREVIOUS_TAG=$(git describe --abbrev=0 --tags $(git rev-list --tags --skip=1 --max-count=1) 2>/dev/null || echo "")
340+ # if [ -z "$PREVIOUS_TAG" ]; then
341+ # COMMITS=$(git log --pretty=format:"- %s (%h)" --reverse)
342+ # else
343+ # COMMITS=$(git log ${PREVIOUS_TAG}..HEAD --pretty=format:"- %s (%h)" --reverse)
344+ # fi
345+ #
346+ # echo "## What's Changed" > release_notes.md
347+ # echo "" >> release_notes.md
348+ # echo "$COMMITS" >> release_notes.md
349+ # echo "" >> release_notes.md
350+ # echo "## Upstream MLX" >> release_notes.md
351+ # echo "- Version: ${MLX_TAG}" >> release_notes.md
352+ # echo "- Commit: ${MLX_COMMIT}" >> release_notes.md
353+ # echo "" >> release_notes.md
354+ # echo "## NuGet Packages" >> release_notes.md
355+ # echo "- [MLXSharp v${RELEASE_VERSION}](https://www.nuget.org/packages/MLXSharp/${RELEASE_VERSION})" >> release_notes.md
356+ # echo "- [MLXSharp.SemanticKernel v${RELEASE_VERSION}](https://www.nuget.org/packages/MLXSharp.SemanticKernel/${RELEASE_VERSION})" >> release_notes.md
357+ #
358+ # cat release_notes.md
359+ #
360+ # - name: Create GitHub Release
361+ # if: steps.check_tag.outputs.exists == 'false'
362+ # uses: softprops/action-gh-release@v1
363+ # with:
364+ # tag_name: v${{ steps.version.outputs.version }}
365+ # name: Release v${{ steps.version.outputs.version }}
366+ # body_path: release_notes.md
367+ # files: artifacts/packages/*
368+ # env:
369+ # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
0 commit comments