mirror of
https://github.com/lordmathis/llamactl.git
synced 2025-11-06 00:54:23 +00:00
Refactor release process to use softprops/action-gh-release for asset uploads and remove GitHub CLI installation steps
This commit is contained in:
39
.github/workflows/release.yaml
vendored
39
.github/workflows/release.yaml
vendored
@@ -177,34 +177,15 @@ jobs:
|
|||||||
ls -la release-assets/
|
ls -la release-assets/
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
id: create_release
|
uses: softprops/action-gh-release@v2
|
||||||
uses: actions/create-release@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ github.ref_name }}
|
name: Release ${{ github.ref_name }}
|
||||||
release_name: Release ${{ github.ref_name }}
|
|
||||||
body: ${{ needs.generate-changelog.outputs.changelog }}
|
body: ${{ needs.generate-changelog.outputs.changelog }}
|
||||||
|
files: release-assets/*
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: ${{ contains(github.ref_name, '-') }}
|
prerelease: ${{ contains(github.ref_name, '-') }}
|
||||||
|
|
||||||
- name: Upload Release Assets
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
|
||||||
# Install GitHub CLI
|
|
||||||
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
|
|
||||||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install gh -y
|
|
||||||
|
|
||||||
# Upload each asset
|
|
||||||
for asset in release-assets/*; do
|
|
||||||
if [ -f "$asset" ]; then
|
|
||||||
echo "Uploading $(basename "$asset")"
|
|
||||||
gh release upload ${{ github.ref_name }} "$asset" --repo ${{ github.repository }}
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
checksums:
|
checksums:
|
||||||
name: Generate Checksums
|
name: Generate Checksums
|
||||||
@@ -241,14 +222,8 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Upload checksums to release
|
- name: Upload checksums to release
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
files: assets/checksums.txt
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
|
||||||
# Install GitHub CLI
|
|
||||||
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
|
|
||||||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install gh -y
|
|
||||||
|
|
||||||
# Upload checksums
|
|
||||||
gh release upload ${{ github.ref_name }} assets/checksums.txt --repo ${{ github.repository }}
|
|
||||||
Reference in New Issue
Block a user