1
0
mirror of https://github.com/hanxi/xiaomusic.git synced 2026-03-15 08:13:16 +08:00

update ci

This commit is contained in:
涵曦
2025-12-26 13:31:34 +08:00
parent b0a1e1ef36
commit 232e01f544

View File

@@ -126,27 +126,7 @@ jobs:
sudo apt update
sudo apt install -y gh
- name: Create or update Release main
if: github.ref_name == 'main'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
RELEASE_NAME=test
RELEASE_BODY="This release is automatically updated from the main branch."
EXISTING_RELEASE=$(gh release view "${RELEASE_NAME}" --json id --jq .id || echo "")
if [[ -n "${EXISTING_RELEASE}" ]]; then
echo "release exist"
else
gh release create "${RELEASE_NAME}" \
--prerelease=false \
--title "${RELEASE_NAME}" \
--notes "${RELEASE_BODY}"
fi
- name: Create or update Release tag
if: startsWith(github.ref, 'refs/tags/v')
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
@@ -164,19 +144,6 @@ jobs:
--notes "${RELEASE_BODY}"
fi
- name: Upload assets to Release main
if: github.ref_name == 'main'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
RELEASE_NAME=test
FILES=$(find . -type f -name "xiaomusic-*.tar.gz")
for FILE in ${FILES}; do
echo "type upload ${FILE}"
gh release upload "${RELEASE_NAME}" "${FILE}" --clobber
done
- name: Upload assets to Release tag
if: startsWith(github.ref, 'refs/tags/v')
env: