feat: Delete depth with gitea.com in CI
Some checks failed
CI / test (push) Successful in 42s
Release / Build and release (push) Failing after 1m40s

This commit is contained in:
NikitolProject
2026-02-25 03:32:28 +03:00
parent b9ed446deb
commit 7c24ae8558

View File

@@ -37,20 +37,49 @@ jobs:
cp shell/decode.sh release/
cd release && sha256sum * > SHA256SUMS
- name: Create release
uses: https://gitea.com/actions/gitea-release-action@v1
with:
files: release/*
body: |
## encrypted_archive ${{ gitea.ref_name }}
- name: Create release via API
env:
TAG: ${{ gitea.ref_name }}
TOKEN: ${{ secrets.GITEA_TOKEN }}
API_URL: ${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}
run: |
BODY=$(cat <<'NOTES'
## encrypted_archive ${TAG}
### Artifacts
### Artifacts
| File | Description |
|------|-------------|
| `encrypted_archive-linux-amd64` | Linux x86_64 (static musl) |
| `encrypted_archive-linux-arm64` | Linux aarch64 (static musl) |
| `encrypted_archive-windows-amd64.exe` | Windows x86_64 |
| `ArchiveDecoder.kt` | Kotlin/Android decoder (source) |
| `decode.sh` | POSIX shell decoder (requires OpenSSL) |
| `SHA256SUMS` | Checksums for all files |
| File | Description |
|------|-------------|
| `encrypted_archive-linux-amd64` | Linux x86_64 (static musl) |
| `encrypted_archive-linux-arm64` | Linux aarch64 (static musl) |
| `encrypted_archive-windows-amd64.exe` | Windows x86_64 |
| `ArchiveDecoder.kt` | Kotlin/Android decoder (source) |
| `decode.sh` | POSIX shell decoder (requires OpenSSL) |
| `SHA256SUMS` | Checksums for all files |
NOTES
)
# Create release
RELEASE_ID=$(curl -s -X POST "${API_URL}/releases" \
-H "Authorization: token ${TOKEN}" \
-H "Content-Type: application/json" \
-d "{
\"tag_name\": \"${TAG}\",
\"name\": \"${TAG}\",
\"body\": $(echo "$BODY" | jq -Rs .),
\"draft\": false,
\"prerelease\": false
}" | jq -r '.id')
echo "Created release ID: ${RELEASE_ID}"
# Upload each artifact
for file in release/*; do
filename=$(basename "$file")
echo "Uploading ${filename}..."
curl -s -X POST "${API_URL}/releases/${RELEASE_ID}/assets?name=${filename}" \
-H "Authorization: token ${TOKEN}" \
-F "attachment=@${file}"
done
echo "Release ${TAG} published with $(ls release/ | wc -l) assets"