Skip to content

Commit bf0cb7d

Browse files
committed
feat: fix the dev release workflow
1 parent 18338ba commit bf0cb7d

File tree

3 files changed

+63
-50
lines changed

3 files changed

+63
-50
lines changed

Diff for: .github/workflows/release-dev.yaml

+5-44
Original file line numberDiff line numberDiff line change
@@ -6,53 +6,18 @@ on:
66
- "v?[0-9]+.[0-9]+.[0-9]+"
77
- "v?[0-9]+.[0-9]+.[0-9]+-dev.[0-9]+"
88
jobs:
9-
build:
10-
name: Build project
11-
runs-on: ubuntu-latest
12-
13-
env:
14-
GO_VERSION: 1.23.4
15-
GOFLAGS: -mod=readonly
16-
17-
steps:
18-
- name: Checkout code
19-
uses: actions/checkout@v4
20-
21-
- name: Setup Go
22-
uses: actions/setup-go@v5
23-
with:
24-
go-version: ${{ env.GO_VERSION }}
25-
26-
- name: Cache Go module dependencies
27-
id: cache-go-module-dependencies
28-
uses: actions/cache@v4
29-
with:
30-
path: ~/go/pkg/mod
31-
key: go-mod-cache-${{ runner.os }}-${{ env.GO_VERSION }}-${{ hashFiles('go.sum') }}
32-
restore-keys: |
33-
go-mod-cache-${{ runner.os }}-${{ env.GO_VERSION }}
34-
go-mod-cache-${{ runner.os }}
35-
go-mod-cache
36-
37-
- name: Build
38-
run: |
39-
cd wfsm
40-
make build
41-
42-
- name: Run tests
43-
run: |
44-
cd wfsm
45-
make test
46-
479
release-dev:
4810
name: Dev release
4911
runs-on: ubuntu-latest
50-
needs: build
12+
permissions: write-all
13+
container:
14+
image: goreleaser/goreleaser-cross:v1.24.0
5115

5216
env:
5317
GO_VERSION: 1.23.4
5418
GOFLAGS: -mod=readonly
5519
GO111MODULE: "on"
20+
CGO_ENABLED: 1
5621

5722
steps:
5823
- name: Checkout code
@@ -63,15 +28,11 @@ jobs:
6328
with:
6429
go-version: ${{ env.GO_VERSION }}
6530

66-
- name: Update package registry
67-
run: sudo apt update --yes
68-
69-
- name: Install RPM
70-
run: sudo apt install rpm --yes
7131

7232
- name: Release
7333
env:
7434
GITHUB_TOKEN: ${{ github.token }}
7535
run: |
7636
cd wfsm
37+
git config --global --add safe.directory '*'
7738
make release-dev

Diff for: examples/manifest_with_deps.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
"ref": {
8383
"name": "email_reviewer",
8484
"version": "1.0.0",
85-
"url": "/Users/smagyari/dev/genai/demo/llama_manifest.json"
85+
"url": "llama_manifest.json"
8686
},
8787
"deployment_option": "src",
8888
"env_var_values": {

Diff for: wfsm/.goreleaser.dev.yml

+57-5
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,73 @@
11
builds:
2-
- main: ./cmd/main.go
2+
- id: darwin-amd64
3+
main: ./cmd/main.go
34
binary: wfsm
5+
goos:
6+
- darwin
7+
goarch:
8+
- amd64
49
env:
510
- CGO_ENABLED=1
6-
ldflags: "-s -w {{ .Env.GORELEASER_LDFLAGS }}"
11+
- PKG_CONFIG_SYSROOT_DIR=/sysroot/macos/amd64
12+
- PKG_CONFIG_PATH=/sysroot/macos/amd64/usr/local/lib/pkgconfig
13+
- CC=o64-clang
14+
- CXX=o64-clang++
15+
16+
flags:
17+
- -mod=readonly
18+
ldflags:
19+
- "-s -w {{ .Env.GORELEASER_LDFLAGS }}"
20+
21+
- id: darwin-arm64
22+
main: ./cmd/main.go
23+
binary: wfsm
724
goos:
8-
- linux
925
- darwin
1026
goarch:
11-
- amd64
1227
- arm64
28+
env:
29+
- CGO_ENABLED=1
30+
- PKG_CONFIG_SYSROOT_DIR=/sysroot/macos/arm64
31+
- PKG_CONFIG_PATH=/sysroot/macos/arm64/usr/local/lib/pkgconfig
32+
- CC=o64-clang
33+
- CXX=o64-clang++
34+
35+
flags:
36+
- -mod=readonly
37+
ldflags:
38+
- "-s -w {{ .Env.GORELEASER_LDFLAGS }}"
39+
40+
- id: linux-armhf
41+
main: ./cmd/main.go
42+
binary: wfsm
43+
goos:
44+
- linux
45+
goarch:
46+
- arm
47+
goarm:
48+
- 7
49+
env:
50+
- CGO_ENABLED=1
51+
- CC=arm-linux-gnueabihf-gcc
52+
- CXX=arm-linux-gnueabihf-g++
53+
- CGO_CFLAGS=--sysroot=/sysroot/linux/armhf
54+
- CGO_LDFLAGS=--sysroot=/sysroot/linux/armhf
55+
- PKG_CONFIG_SYSROOT_DIR=/sysroot/linux/armhf
56+
- PKG_CONFIG_PATH=/sysroot/linux/armhf/opt/vc/lib/pkgconfig:/sysroot/linux/armhf/usr/lib/arm-linux-gnueabihf/pkgconfig:/sysroot/linux/armhf/usr/lib/pkgconfig:/sysroot/linux/armhf/usr/local/lib/pkgconfig
57+
flags:
58+
- -mod=readonly
59+
ldflags:
60+
- "-s -w {{ .Env.GORELEASER_LDFLAGS }}"
1361

1462
archives:
1563
- name_template: "wfsm{{ .Version }}_{{ .Os }}_{{ .Arch }}"
64+
builds:
65+
- darwin-amd64
66+
- darwin-arm64
67+
- linux-armhf
1668

1769
checksum:
18-
name_template: "acpilot_checksums.txt"
70+
name_template: "wfsm_checksums.txt"
1971

2072
changelog:
2173
skip: true

0 commit comments

Comments
 (0)