mirror of
https://github.com/shadoll/moma.git
synced 2026-08-28 03:27:34 +00:00
fix: Update release workflow to correctly handle wheel file naming and aliases
This commit is contained in:
@@ -43,13 +43,14 @@ jobs:
|
|||||||
id: version
|
id: version
|
||||||
run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
|
run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Create short-name and latest aliases
|
- name: Create latest tarball alias
|
||||||
run: |
|
run: |
|
||||||
WHL=$(ls dist/moma-${{ steps.version.outputs.version }}-*.whl)
|
|
||||||
cp "$WHL" dist/moma-${{ steps.version.outputs.version }}.whl
|
|
||||||
cp "$WHL" dist/moma-latest.whl
|
|
||||||
cp dist/moma-${{ steps.version.outputs.version }}.tar.gz dist/moma-latest.tar.gz
|
cp dist/moma-${{ steps.version.outputs.version }}.tar.gz dist/moma-latest.tar.gz
|
||||||
|
|
||||||
|
- name: Get wheel filename
|
||||||
|
id: wheel
|
||||||
|
run: echo "filename=$(basename dist/moma-${{ steps.version.outputs.version }}-*.whl)" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Create GitHub Release
|
- name: Create GitHub Release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
@@ -64,18 +65,17 @@ jobs:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# With uv — always latest
|
# With uv — always latest
|
||||||
uv tool install https://github.com/shadoll/moma/releases/latest/download/moma-latest.whl
|
uv tool install https://github.com/shadoll/moma/releases/latest/download/moma-latest.tar.gz
|
||||||
|
|
||||||
# With uv — specific version
|
# With uv — specific version
|
||||||
uv tool install https://github.com/shadoll/moma/releases/download/${{ github.ref_name }}/moma-${{ steps.version.outputs.version }}.whl
|
uv tool install https://github.com/shadoll/moma/releases/download/${{ github.ref_name }}/${{ steps.wheel.outputs.filename }}
|
||||||
|
|
||||||
# With pip
|
# With pip
|
||||||
pip install https://github.com/shadoll/moma/releases/download/${{ github.ref_name }}/moma-${{ steps.version.outputs.version }}.whl
|
pip install https://github.com/shadoll/moma/releases/download/${{ github.ref_name }}/${{ steps.wheel.outputs.filename }}
|
||||||
```
|
```
|
||||||
files: |
|
files: |
|
||||||
dist/moma-${{ steps.version.outputs.version }}.whl
|
dist/moma-${{ steps.version.outputs.version }}-*.whl
|
||||||
dist/moma-${{ steps.version.outputs.version }}.tar.gz
|
dist/moma-${{ steps.version.outputs.version }}.tar.gz
|
||||||
dist/moma-latest.whl
|
|
||||||
dist/moma-latest.tar.gz
|
dist/moma-latest.tar.gz
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
|
|||||||
Reference in New Issue
Block a user