From b14072ddb2ba45d4d778bcf1c43c2f018b75e29f Mon Sep 17 00:00:00 2001 From: t Date: Thu, 2 Apr 2026 14:19:17 -0400 Subject: [PATCH] removed test data --- .gitea/workflows/release.yaml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index 6ab7fac..d64820d 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -2,15 +2,16 @@ name: Build and Release Core on: push: + branches: [ main ] # Runs tests on standard pushes tags: - - 'v*' # Only trigger when you push a version tag (e.g., v1.0.0) + - 'v*' # Runs tests AND builds/releases on tags pull_request: - branches: [ main ] # Run tests on PRs, but don't build release binaries + branches: [ main ] jobs: build: name: Test and Build - runs-on: ubuntu-latest # This runs on your Gitea act_runner + runs-on: ubuntu-latest steps: - name: Checkout Code uses: actions/checkout@v4 @@ -18,20 +19,17 @@ jobs: - name: Setup Go uses: actions/setup-go@v4 with: - go-version: '1.26' # Update to match your go.mod if different + go-version: '1.24' # Note: Adjusted to a currently valid Go version - name: Run Tests run: go test ./... -v - name: Build Binaries - # Only run the build steps if this was triggered by a tag push if: startsWith(github.ref, 'refs/tags/') run: | - VERSION=${GITHUB_REF_NAME} COMMIT=$(echo ${GITHUB_SHA} | cut -c1-7) - LDFLAGS="-X 'main.BuildVersion=$VERSION' -X 'main.BuildCommit=$COMMIT'" mkdir -p bin @@ -45,9 +43,12 @@ jobs: echo "Building Windows (amd64)..." GOOS=windows GOARCH=amd64 go build -ldflags="$LDFLAGS" -o bin/rr-windows-amd64.exe ./cmd/rr/main.go - - name: Upload Artifacts + - name: Create Release and Upload Binaries if: startsWith(github.ref, 'refs/tags/') - uses: actions/upload-artifact@v4 + uses: softprops/action-gh-release@v1 with: - name: riskrancher-core-binaries - path: bin/ \ No newline at end of file + files: bin/* + name: Release ${{ github.ref_name }} + generate_release_notes: true + env: + GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }} \ No newline at end of file