Skip to content

Commit c30e660

Browse files
committed
add gomod
1 parent f063d97 commit c30e660

File tree

6 files changed

+28
-20
lines changed

6 files changed

+28
-20
lines changed

.github/workflows/gno-fmt.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ jobs:
3333
go-version: ${{ env.GO_VERSION }}
3434
cache: true
3535

36-
- name: Expose GOBIN on PATH
37-
run: echo "${GOBIN}" >> "$GITHUB_PATH"
38-
3936
- name: Checkout tools repo
4037
uses: actions/checkout@v4
4138
with:

.github/workflows/gno-lint.yaml

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,20 @@ jobs:
3333
go-version: ${{ env.GO_VERSION }}
3434
cache: true
3535

36-
- name: Expose GOBIN on PATH
37-
run: echo "${GOBIN}" >> "$GITHUB_PATH"
36+
- name: Ensure deps are downloaded
37+
run: go mod download
3838

39-
- name: Checkout tools repo
40-
uses: actions/checkout@v4
41-
with:
42-
repository: ${{ env.TOOLS_REPO }}
43-
ref: ${{ env.TOOLS_REF }} # master, latest commit
44-
path: toolsrepo
45-
fetch-depth: 1 # only latest commit
39+
- name: Read pinned Gno version from go.mod
40+
id: gnoversion
41+
run: |
42+
V=$(go list -m -f '{{.Version}}' github.com/gnolang/gno)
43+
echo "version=$V" >> "$GITHUB_OUTPUT"
4644
47-
- name: Install tools
45+
- name: Install gno
4846
run: |
49-
cd toolsrepo
50-
# Install from the tools repo
51-
go install ./gnovm/cmd/gno
47+
go install github.com/gnolang/gno/gnovm/cmd/gno@${{ steps.gnoversion.outputs.version }}
48+
gno version
5249
5350
- name: Lint
5451
working-directory: packages
55-
run: gno lint ./... -v || true
52+
run: gno lint ./... -v

.github/workflows/gno-test.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ jobs:
3333
go-version: ${{ env.GO_VERSION }}
3434
cache: true
3535

36-
- name: Expose GOBIN on PATH
37-
run: echo "${GOBIN}" >> "$GITHUB_PATH"
38-
3936
- name: Checkout tools repo
4037
uses: actions/checkout@v4
4138
with:

go.mod

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module your/module
2+
3+
go 1.23.0
4+
5+
toolchain go1.24.3
6+
7+
require github.com/gnolang/gno v0.0.0-20250922044730-89d8028c2d5e // indirect

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github.com/gnolang/gno v0.0.0-20250922044730-89d8028c2d5e h1:A3IJoquF3lC9td4uDbSwSIp13myzoavs8IqpaYcxmi8=
2+
github.com/gnolang/gno v0.0.0-20250922044730-89d8028c2d5e/go.mod h1:j9wKq29meqwktEj2ReqPbSkeYUwoisfxHHVeV20lhtw=

tools.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//go:build tools
2+
// +build tools
3+
4+
package tools
5+
6+
import (
7+
_ "github.com/gnolang/gno/gnovm/cmd/gno"
8+
)

0 commit comments

Comments
 (0)