Исправлен workflow для сборки и релиза
Some checks failed
Release Build / release (push) Failing after 56s
Some checks failed
Release Build / release (push) Failing after 56s
This commit is contained in:
@@ -6,7 +6,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
runs-on: [ubuntu-latest]
|
runs-on: ubuntu-latest # Убраны квадратные скобки (для Gitea это важно)
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
@@ -14,25 +14,15 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
mkdir -p bin
|
mkdir -p bin
|
||||||
go build -o bin/hello-api-${{ github.ref_name }} main.go
|
go build -o bin/hello-api-${{ github.ref_name }} main.go
|
||||||
|
ls -la bin/ # Добавлено для отладки
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
uses: actions/create-release@v1
|
uses: softprops/action-gh-release@v1 # Используем специальный Action для Gitea
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITEATOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITEATOKEN }} # Только один токен!
|
||||||
GITEA_TOKEN: ${{ secrets.GITEATOKEN }}
|
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ github.ref }}
|
tag_name: ${{ github.ref_name }}
|
||||||
release_name: "Release ${{ github.ref }}"
|
name: "Release ${{ github.ref_name }}"
|
||||||
body: "Automated release"
|
body: "Automated release"
|
||||||
draft: false
|
files: |
|
||||||
prerelease: false
|
bin/hello-api-${{ github.ref_name }}
|
||||||
|
|
||||||
- name: Upload Asset
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITEATOKEN }}
|
|
||||||
GITEA_TOKEN: ${{ secrets.GITEATOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_path: ./bin/hello-api-${{ github.ref_name }}
|
|
||||||
asset_name: hello-api-${{ github.ref_name }}
|
|
Reference in New Issue
Block a user