Skip to content

Commit adbd924

Browse files
committed
update workflows
1 parent 3903882 commit adbd924

2 files changed

Lines changed: 13 additions & 54 deletions

File tree

.github/workflows/build.yml

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build and Test
1+
name: Test
22

33
on:
44
push:
@@ -8,43 +8,21 @@ on:
88

99
jobs:
1010
test:
11-
name: Run Tests
11+
name: Test Go Module
1212
runs-on: ubuntu-latest
1313

1414
steps:
1515
- name: Checkout code
1616
uses: actions/checkout@v4
1717

18-
- name: Set up Go
18+
- name: Setup Go
1919
uses: actions/setup-go@v4
2020
with:
2121
go-version: '1.23'
22+
cache: true
2223

23-
- name: Cache Go modules
24-
uses: actions/cache@v3
25-
with:
26-
path: |
27-
~/.cache/go-build
28-
~/go/pkg/mod
29-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
30-
restore-keys: |
31-
${{ runner.os }}-go-
32-
33-
- name: Install dependencies
34-
run: go mod download
35-
3624
- name: Run tests
37-
run: go test -v ./...
38-
39-
- name: Run tests with coverage
40-
run: go test -v -coverprofile=coverage.out ./...
41-
42-
- name: Upload coverage to Codecov
43-
uses: codecov/codecov-action@v3
44-
with:
45-
file: ./coverage.out
46-
flags: unittests
47-
name: codecov-umbrella
25+
run: go test -race ./...
4826

4927

5028

@@ -68,7 +46,7 @@ jobs:
6846
go build -o bin/mcp-server ./cmd/mcp-server
6947
7048
- name: Upload build artifacts
71-
uses: actions/upload-artifact@v3
49+
uses: actions/upload-artifact@v4
7250
with:
7351
name: mcp-server-binary
7452
path: bin/mcp-server
@@ -94,7 +72,7 @@ jobs:
9472
docker save weave-toolkit/mcp-server:latest -o mcp-server-image.tar
9573
9674
- name: Upload Docker image artifact
97-
uses: actions/upload-artifact@v3
75+
uses: actions/upload-artifact@v4
9876
with:
9977
name: mcp-server-docker-image
10078
path: mcp-server-image.tar

.github/workflows/release.yml

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,47 +7,28 @@ on:
77

88
jobs:
99
release:
10-
name: Create Release
10+
name: Build and Release
1111
runs-on: ubuntu-latest
1212

1313
steps:
1414
- name: Checkout code
1515
uses: actions/checkout@v4
16-
with:
17-
fetch-depth: 0
18-
19-
- name: Set up Go
16+
17+
- name: Setup Go
2018
uses: actions/setup-go@v4
2119
with:
2220
go-version: '1.23'
21+
cache: true
2322

24-
- name: Build application
23+
- name: Build
2524
run: |
2625
mkdir -p bin
2726
go build -o bin/mcp-server ./cmd/mcp-server
2827
29-
- name: Get version from tag
30-
id: get_version
31-
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
32-
3328
- name: Create Release
3429
uses: softprops/action-gh-release@v1
3530
with:
36-
tag_name: ${{ github.ref }}
37-
name: Release ${{ github.ref_name }}
38-
body: |
39-
Weave Toolkit MCP Server ${{ github.ref_name }}
40-
41-
## Changes
42-
43-
See the commit history for detailed changes.
44-
draft: false
45-
prerelease: false
46-
files: |
47-
bin/mcp-server
48-
README.md
49-
50-
- name: Upload binary to release
31+
files: bin/mcp-server
5132
uses: actions/upload-release-asset@v1
5233
env:
5334
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)