chore: fix cd
This commit is contained in:
@@ -12,10 +12,8 @@ permissions:
|
|||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
env:
|
env:
|
||||||
TOKEN: ${{ secrets.TOKEN }}
|
TOKEN: ${{ secrets.TOKEN }}
|
||||||
@@ -23,7 +21,6 @@ jobs:
|
|||||||
TAG="${{ gitea.ref_name }}"
|
TAG="${{ gitea.ref_name }}"
|
||||||
REPO="${{ gitea.repository }}"
|
REPO="${{ gitea.repository }}"
|
||||||
SERVER="${{ gitea.server_url }}"
|
SERVER="${{ gitea.server_url }}"
|
||||||
|
|
||||||
curl -X POST \
|
curl -X POST \
|
||||||
-H "Authorization: token $TOKEN" \
|
-H "Authorization: token $TOKEN" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
@@ -45,25 +42,26 @@ jobs:
|
|||||||
arch: amd64
|
arch: amd64
|
||||||
- goos: linux
|
- goos: linux
|
||||||
arch: arm64
|
arch: arm64
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
|
|
||||||
- uses: actions/setup-go@v6
|
- uses: actions/setup-go@v6
|
||||||
with:
|
with:
|
||||||
go-version: '1.25'
|
go-version: '1.25'
|
||||||
cache: false
|
cache: false
|
||||||
|
|
||||||
- run: go mod tidy
|
- run: go mod tidy
|
||||||
|
|
||||||
- run: go test ./...
|
- run: go test ./...
|
||||||
|
|
||||||
- name: Build ${{ matrix.goos }}-${{ matrix.arch }}
|
- name: Build ${{ matrix.goos }}-${{ matrix.arch }}
|
||||||
env:
|
env:
|
||||||
GOOS: ${{ matrix.goos }}
|
GOOS: ${{ matrix.goos }}
|
||||||
GOARCH: ${{ matrix.arch }}
|
GOARCH: ${{ matrix.arch }}
|
||||||
run: go build -o banforge-${{ matrix.goos }}-${{ matrix.arch }} ./cmd/banforge
|
run: go build -o banforge-${{ matrix.goos }}-${{ matrix.arch }} ./cmd/banforge
|
||||||
|
- name: Upload ${{ matrix.goos }}-${{ matrix.arch }}
|
||||||
|
env:
|
||||||
|
TOKEN: ${{ secrets.TOKEN }}
|
||||||
|
run: |
|
||||||
|
TAG="${{ gitea.ref_name }}"
|
||||||
|
FILE="banforge-${{ matrix.goos }}-${{ matrix.arch }}"
|
||||||
|
curl --user d3m0k1d:$TOKEN \
|
||||||
|
--upload-file $FILE \
|
||||||
|
https://gitea.d3m0k1d.ru/api/packages/d3m0k1d/generic/banforge/$TAG/$FILE
|
||||||
|
|||||||
Reference in New Issue
Block a user