fix: ci
All checks were successful
CI.yml / build (push) Successful in 1m43s

This commit is contained in:
d3m0k1d
2026-01-14 01:05:26 +03:00
parent 3b60436ab8
commit 3d904118d7

View File

@@ -1,4 +1,3 @@
name: CD - BanForge Release name: CD - BanForge Release
on: on:
@@ -11,7 +10,34 @@ permissions:
contents: write contents: write
jobs: jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Create Release
env:
TOKEN: ${{ secrets.TOKEN }}
run: |
TAG="${{ gitea.ref_name }}"
REPO="${{ gitea.repository }}"
SERVER="${{ gitea.server_url }}"
curl -X POST \
-H "Authorization: token $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"tag_name": "'$TAG'",
"name": "Release '$TAG'",
"body": "# BanForge '$TAG'\n\nIntrusion Prevention System",
"draft": false,
"prerelease": false
}' \
"$SERVER/api/v1/repos/$REPO/releases"
build: build:
needs: release
strategy: strategy:
matrix: matrix:
include: include:
@@ -48,22 +74,9 @@ jobs:
REPO="${{ gitea.repository }}" REPO="${{ gitea.repository }}"
SERVER="${{ gitea.server_url }}" SERVER="${{ gitea.server_url }}"
if [ "${{ matrix.arch }}" = "amd64" ]; then
curl -X POST \
-H "Authorization: token $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"tag_name": "'$TAG'",
"name": "Release '$TAG'",
"body": "# BanForge '$TAG'\n\nIntrusion Prevention System",
"draft": false,
"prerelease": false
}' \
"$SERVER/api/v1/repos/$REPO/releases" 2>/dev/null || true
fi
curl -X POST \ curl -X POST \
-H "Authorization: token $TOKEN" \ -H "Authorization: token $TOKEN" \
-H "Content-Type: application/octet-stream" \ -H "Content-Type: application/octet-stream" \
--data-binary "@banforge-${{ matrix.goos }}-${{ matrix.arch }}" \ --data-binary "@banforge-${{ matrix.goos }}-${{ matrix.arch }}" \
"$SERVER/api/v1/repos/$REPO/releases/tags/$TAG/assets?name=banforge-${{ matrix.goos }}-${{ matrix.arch }}" "$SERVER/api/v1/repos/$REPO/releases/tags/$TAG/assets?name=banforge-${{ matrix.goos }}-${{ matrix.arch }}"