Skip to content

Commit 09d1919

Browse files
Merge branch 'main' into feature/gatling-binary-log
2 parents 3f10ec0 + 6729e02 commit 09d1919

File tree

3 files changed

+96
-32
lines changed

3 files changed

+96
-32
lines changed

.github/workflows/build-common.yml

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# .github/workflows/build-common.yml
2+
name: Common Build Tasks
3+
4+
on:
5+
workflow_call:
6+
outputs:
7+
artifact-name:
8+
description: "x2i binaries"
9+
value: x2i-binaries
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up Go
18+
uses: actions/setup-go@v5
19+
with:
20+
go-version: 1.22.4
21+
22+
- name: Build
23+
run: |
24+
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o x2i-linux-amd64 x2i.go
25+
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -o x2i-linux-arm64 x2i.go
26+
GOOS=windows GOARCH=386 go build -o x2i-windows-386.exe x2i.go
27+
GOOS=windows GOARCH=amd64 go build -o x2i-windows-amd64.exe x2i.go
28+
GOOS=darwin GOARCH=amd64 go build -o x2i-macos-amd64 x2i.go
29+
GOOS=darwin GOARCH=arm64 go build -o x2i-macos-arm64 x2i.go
30+
31+
- name: Upload Linux AMD64
32+
uses: actions/upload-artifact@v4
33+
with:
34+
name: x2i-linux-amd64
35+
path: x2i-linux-amd64
36+
37+
- name: Upload Linux ARM64
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: x2i-linux-arm64
41+
path: x2i-linux-arm64
42+
43+
- name: Upload Windows 386
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: x2i-windows-386
47+
path: x2i-windows-386.exe
48+
49+
- name: Upload Windows AMD64
50+
uses: actions/upload-artifact@v4
51+
with:
52+
name: x2i-windows-amd64
53+
path: x2i-windows-amd64.exe
54+
55+
- name: Upload macOS AMD64
56+
uses: actions/upload-artifact@v4
57+
with:
58+
name: x2i-macos-amd64
59+
path: x2i-macos-amd64
60+
61+
- name: Upload macOS ARM64
62+
uses: actions/upload-artifact@v4
63+
with:
64+
name: x2i-macos-arm64
65+
path: x2i-macos-arm64

.github/workflows/build.yml

+1-32
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,8 @@ name: build x2i
22

33
on:
44
push:
5-
tags:
6-
- x2i-*
7-
85
workflow_dispatch:
96

107
jobs:
118
build:
12-
13-
runs-on: ubuntu-latest
14-
permissions:
15-
contents: write
16-
steps:
17-
- uses: actions/checkout@v4
18-
19-
- name: Set up Go
20-
uses: actions/setup-go@v5
21-
with:
22-
go-version: 1.22.4
23-
24-
- name: Build
25-
run: |
26-
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o x2i-linux-amd64 x2i.go
27-
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -o x2i-linux-arm64 x2i.go
28-
GOOS=windows GOARCH=386 go build -o x2i-windows-386.exe x2i.go
29-
GOOS=windows GOARCH=amd64 go build -o x2i-windows-amd64.exe x2i.go
30-
GOOS=darwin GOARCH=amd64 go build -o x2i-macos-amd64 x2i.go
31-
GOOS=darwin GOARCH=arm64 go build -o x2i-macos-arm64 x2i.go
32-
33-
- uses: olegtarasov/[email protected]
34-
id: tagName
35-
36-
- uses: ncipollo/[email protected]
37-
with:
38-
artifacts: "x2i-*"
39-
body: "Release ${{ steps.tagName.outputs.tag }}"
40-
9+
uses: ./.github/workflows/build-common.yml

.github/workflows/release.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: release x2i
2+
3+
on:
4+
push:
5+
tags:
6+
- x2i-*
7+
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
uses: ./.github/workflows/build-common.yml
13+
14+
release:
15+
needs: build
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: write
19+
steps:
20+
- uses: actions/download-artifact@v4
21+
with:
22+
name: ${{ needs.build.outputs.artifact-name }}
23+
24+
- uses: olegtarasov/[email protected]
25+
id: tagName
26+
27+
- uses: ncipollo/[email protected]
28+
with:
29+
artifacts: "x2i-*/*"
30+
body: "Release ${{ steps.tagName.outputs.tag }}"

0 commit comments

Comments
 (0)