更新 install.sh
Some checks failed
Gitea Actions Build / build and releases (push) Has been cancelled

This commit is contained in:
Armamem0t 2025-06-18 22:18:39 +08:00
parent a77e05a088
commit 495d24feca
Signed by: minglipro
GPG Key ID: 5F355A77B22AA93B
2 changed files with 20 additions and 16 deletions

View File

@ -33,11 +33,4 @@ jobs:
VERSIONS=$(echo "$VERSIONS" | tr -d '\r')
FILENAME="${GROUPSID}-${VERSIONS}.jar"
java -jar build/libs/${FILENAME} -s "${{gitea.server_url}}" -o "${{gitea.repository_owner}}" -r ${{gitea.event.repository.name}} -t "${{gitea.token}}" -ti "Auto releases ${{gitea.sha}} ${VERSIONS}" -b "# Auto releases wtih ${{gitea.event.head_commit.message}} - [${{gitea.sha}}](${{gitea.event.head_commit.url}})" -tn "Auto-Releases-${VERSIONS}-${{gitea.sha}}" -a "build/libs"
TestEnv:
runs-on: ubuntu-latest
steps:
- name: TestPython2
run: |
python -v
python --version 2>&1 | grep -q "Python 2" && echo "Python 2 ready" || echo "Python 2 not found"

View File

@ -1,14 +1,25 @@
curl -o releases.json https://git.mingliqiye.com/api/v1/repos/Actions/com.mingliqiye.gitea.releases/releases
FILENAME=$(jq -r .[0].assets[0].name releases.json)
DOWNLOADURL=$(jq -r .[0].assets[0].browser_download_url releases.json)
echo fileName:$FILENAME
echo BrowserDownloadUrl:$DOWNLOADURL
echo Downloading ... $FILENAME
FILENAME=$(python3 -c "
import json;
with open('releases.json') as f:
data = json.load(f)
print(data[0]['assets'][0]['name'])
")
curl -O $DOWNLOADURL
DOWNLOADURL=$(python3 -c "
import json;
with open('releases.json') as f:
data = json.load(f)
print(data[0]['assets'][0]['browser_download_url'])
")
mv $FILENAME com.mingliqiye.gitea.releases.jar
echo "fileName:$FILENAME"
echo "BrowserDownloadUrl:$DOWNLOADURL"
echo "Downloading ... $FILENAME"
curl -O "$DOWNLOADURL"
mv "$FILENAME" com.mingliqiye.gitea.releases.jar
rm releases.json
rm install.sh
ls
echo com.mingliqiye.gitea.releases.jar Downloaded