Исправлен workflow - 5 для сборки и релиза
Some checks failed
Release Build / release (push) Failing after 44s

This commit is contained in:
2025-07-27 13:18:21 +06:00
parent 8c7ffdf5a7
commit 5614bd6ada

View File

@@ -13,7 +13,7 @@ jobs:
repository: 'GiteaAdmin/hello_gitea' repository: 'GiteaAdmin/hello_gitea'
path: 'hello_gitea' path: 'hello_gitea'
token: ${{ secrets.GITEATOKEN }} token: ${{ secrets.GITEATOKEN }}
git-server-url: 'https://direct-dev.ru/gitea' ref: ${{ github.ref }}
- name: Build - name: Build
run: | run: |
@@ -23,13 +23,28 @@ jobs:
ls -la bin/ ls -la bin/
- name: Create Release - name: Create Release
uses: softprops/action-gh-release@v1 run: |
env: cd hello_gitea
GITHUB_TOKEN: ${{ secrets.GITEATOKEN }} # Create release using Gitea API
GITHUB_API_URL: 'https://direct-dev.ru/gitea/api/v1' curl -X POST \
with: -H "Authorization: token ${{ secrets.GITEATOKEN }}" \
tag_name: ${{ github.ref_name }} -H "Content-Type: application/json" \
name: "Release ${{ github.ref_name }}" -d '{
body: "Automated release" "tag_name": "${{ github.ref_name }}",
files: | "name": "Release ${{ github.ref_name }}",
hello_gitea/bin/hello-api-${{ github.ref_name }} "body": "Automated release",
"draft": false,
"prerelease": false
}' \
"https://direct-dev.ru/gitea/api/v1/repos/GiteaAdmin/hello_gitea/releases"
# Upload asset
RELEASE_ID=$(curl -s -H "Authorization: token ${{ secrets.GITEATOKEN }}" \
"https://direct-dev.ru/gitea/api/v1/repos/GiteaAdmin/hello_gitea/releases/tags/${{ github.ref_name }}" | \
jq -r '.id')
curl -X POST \
-H "Authorization: token ${{ secrets.GITEATOKEN }}" \
-H "Content-Type: application/octet-stream" \
--data-binary @bin/hello-api-${{ github.ref_name }} \
"https://direct-dev.ru/gitea/api/v1/repos/GiteaAdmin/hello_gitea/releases/$RELEASE_ID/assets?name=hello-api-${{ github.ref_name }}"