Fixed workflow build
All checks were successful
/ build (push) Successful in 2m3s

This commit is contained in:
lichenblankie 2026-04-11 05:07:24 +00:00
parent cb1175a5d1
commit 6ad3ac8743

View file

@ -30,14 +30,28 @@ jobs:
run: | run: |
cp dist/TinyWeb TinyWeb-linux-x64 cp dist/TinyWeb TinyWeb-linux-x64
chmod +x TinyWeb-linux-x64 chmod +x TinyWeb-linux-x64
ls -la TinyWeb-linux-x64
- name: Create Release - name: Create Release
if: startsWith(github.ref, 'refs/tags/v') if: startsWith(github.ref, 'refs/tags/v')
uses: https://code.forgejo.org/actions/forgejo-release@v2 run: |
with: TAG="${{ github.ref_name }}"
direction: upload REPO="${{ github.repository }}"
release-dir: . TOKEN="${{ secrets.FORGEJO_TOKEN }}"
override: true # Try to create release (ignore error if exists)
env: curl -X POST "https://git.derickphan.com/api/v1/repos/$REPO/releases" \
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }} -H "Authorization: token $TOKEN" \
-H "Content-Type: application/json" \
-d "{\"tag_name\":\"$TAG\",\"name\":\"$TAG\"}" || true
- name: Upload to Release
if: startsWith(github.ref, 'refs/tags/v')
run: |
FILE=TinyWeb-linux-x64
TAG="${{ github.ref_name }}"
REPO="${{ github.repository }}"
TOKEN="${{ secrets.FORGEJO_TOKEN }}"
curl -X POST "https://git.derickphan.com/api/v1/repos/$REPO/releases/$TAG/assets" \
-H "Authorization: token $TOKEN" \
-F "attachment=@$FILE"