ci: rilis via API Gitea (ganti action-gh-release) + fix deps build
This commit is contained in:
1 parent
dfdab88b43
commit
20d15efc3b
1 file changed
+15
-10
@@ -39,16 +39,21 @@ jobs:
|
|||||||
ls -lh dist/lazyrun-*.AppImage*
|
ls -lh dist/lazyrun-*.AppImage*
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
uses: softprops/action-gh-release@v2
|
env:
|
||||||
with:
|
TOKEN: ${{ github.token }}
|
||||||
name: LazyRun ${{ github.ref_name }}
|
run: |
|
||||||
generate_release_notes: true
|
API="${GITHUB_API_URL:-${GITHUB_SERVER_URL}/api/v1}"
|
||||||
body: |
|
TAG="${GITHUB_REF_NAME}"
|
||||||
|
cat > /tmp/body.md <<'EOF'
|
||||||
Single-file AppImage for Linux x86_64. No root needed, everything stays in
|
Single-file AppImage for Linux x86_64. No root needed, everything stays in
|
||||||
`~/.local/` and `~/.config/lazyrun/`.
|
`~/.local/` and `~/.config/lazyrun/`.
|
||||||
|
|
||||||
Already using LazyRun? It checks this release page on startup and offers to
|
Already using LazyRun? It upgrades itself from this release page.
|
||||||
update itself (delta updates with `AppImageUpdate` when installed).
|
EOF
|
||||||
files: |
|
python3 -c 'import json,sys;print(json.dumps({"tag_name":sys.argv[1],"name":"LazyRun "+sys.argv[1],"body":open(sys.argv[2]).read()}))' "$TAG" /tmp/body.md > /tmp/rel.json
|
||||||
dist/lazyrun-*.AppImage
|
RID=$(curl -sf -X POST -H "Authorization: token $TOKEN" -H "Content-Type: application/json" "$API/repos/$GITHUB_REPOSITORY/releases" --data @/tmp/rel.json | python3 -c 'import json,sys;print(json.load(sys.stdin)["id"])')
|
||||||
dist/lazyrun-*.AppImage.zsync
|
echo "release id=$RID"
|
||||||
|
for f in dist/lazyrun-*.AppImage dist/lazyrun-*.AppImage.zsync; do
|
||||||
|
[ -f "$f" ] || continue
|
||||||
|
curl -sf -X POST -H "Authorization: token $TOKEN" -F "attachment=@$f" "$API/repos/$GITHUB_REPOSITORY/releases/$RID/assets?name=$(basename "$f")" -o /dev/null
|
||||||
|
done
|
||||||
Reference in new issue
Block a user