generated from MrSphay/codex-agent-repository-kit
This commit is contained in:
@@ -56,3 +56,24 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: MrTrust-0.1.2
|
name: MrTrust-0.1.2
|
||||||
path: dist/MrTrust-0.1.2.zip
|
path: dist/MrTrust-0.1.2.zip
|
||||||
|
|
||||||
|
- name: Attach ZIP to Gitea release
|
||||||
|
if: github.ref == 'refs/heads/main'
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
version="0.1.2"
|
||||||
|
api="http://gitea:3000/api/v1/repos/${GITHUB_REPOSITORY}"
|
||||||
|
release_json="$(curl -fsS -H "Authorization: token ${GITEA_TOKEN}" "${api}/releases/tags/v${version}")"
|
||||||
|
release_id="$(printf '%s' "$release_json" | sed -n 's/.*"id":\([0-9][0-9]*\).*/\1/p' | head -n 1)"
|
||||||
|
if [ -z "$release_id" ]; then
|
||||||
|
echo "Could not resolve release id for v${version}" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
curl -fsS \
|
||||||
|
-X POST \
|
||||||
|
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||||
|
-F "attachment=@dist/MrTrust-${version}.zip" \
|
||||||
|
"${api}/releases/${release_id}/assets?name=MrTrust-${version}.zip"
|
||||||
|
|||||||
Reference in New Issue
Block a user