update buildflow
Some checks failed
Build and Release / build-and-release (386, linux, linux-386) (push) Failing after 3s
Build and Release / build-and-release (386, windows, windows-386) (push) Failing after 3s
Build and Release / build-and-release (amd64, linux, linux-amd64) (push) Failing after 4s
Build and Release / build-and-release (amd64, windows, windows-amd64) (push) Failing after 3s
Build and Release / build-and-release (arm, 7, linux, linux-armv7) (push) Failing after 3s
Build and Release / build-and-release (arm64, linux, linux-arm64) (push) Failing after 4s
Build and Release / build-and-release (ppc64le, linux, linux-ppc64le) (push) Failing after 3s

This commit is contained in:
2025-12-23 15:26:00 +01:00
parent 6578e93a16
commit 17a0346aa8

View File

@@ -6,7 +6,7 @@ on:
- 'v*' - 'v*'
jobs: jobs:
build: build-and-release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
@@ -65,50 +65,15 @@ jobs:
fi fi
go build -ldflags "-X main.Version=${VERSION} -X main.BuildTime=${BUILD_TIME}" \ go build -ldflags "-X main.Version=${VERSION} -X main.BuildTime=${BUILD_TIME}" \
-o bin/${OUTPUT_NAME} ./cmd/safelineApi -o bin/${OUTPUT_NAME} ./cmd/safelineApi
echo "BINARY_PATH=bin/${OUTPUT_NAME}" >> $GITHUB_ENV
echo "BINARY_NAME=${OUTPUT_NAME}" >> $GITHUB_ENV echo "BINARY_NAME=${OUTPUT_NAME}" >> $GITHUB_ENV
- name: Create release assets directory - name: Upload Release Asset
run: |
mkdir -p release-assets
cp ${{ env.BINARY_PATH }} release-assets/
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}
path: release-assets/${{ env.BINARY_NAME }}
retention-days: 1
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: release-artifacts
- name: Get version
id: version
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Flatten artifacts
run: |
mkdir -p final-release
find release-artifacts -type f -exec mv {} final-release/ \;
ls -la final-release/
- name: Create Release
uses: gitea-github-actions/actions/gitea-release@main uses: gitea-github-actions/actions/gitea-release@main
with: with:
files: final-release/* files: bin/${{ env.BINARY_NAME }}
draft: false draft: false
prerelease: false prerelease: false
allowUpdates: true
title: Release ${{ steps.version.outputs.VERSION }} title: Release ${{ steps.version.outputs.VERSION }}
body: | body: |
# SafelineAPI ${{ steps.version.outputs.VERSION }} # SafelineAPI ${{ steps.version.outputs.VERSION }}