Skip to content

Commit 6caca78

Browse files
authored
Merge pull request #994 from per1234/gon-tool
Use Go modules system to manage Gon tool dependency
2 parents 09cec53 + 8509a82 commit 6caca78

File tree

4 files changed

+65
-21
lines changed

4 files changed

+65
-21
lines changed

.github/workflows/publish-go-nightly-task.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@ jobs:
111111
- name: Checkout repository
112112
uses: actions/checkout@v5
113113

114+
- name: Install Go
115+
uses: actions/setup-go@v6
116+
with:
117+
go-version-file: go.mod
118+
114119
- name: Download artifacts
115120
uses: actions/download-artifact@v6
116121
with:
@@ -151,16 +156,6 @@ jobs:
151156
-k "${{ env.KEYCHAIN_PASSWORD }}" \
152157
"${{ env.KEYCHAIN }}"
153158
154-
- name: Install gon for code signing and app notarization
155-
run: |
156-
wget \
157-
-q \
158-
https://github.com/Bearer/gon/releases/download/v0.0.27/gon_macos.zip
159-
160-
unzip \
161-
gon_macos.zip \
162-
-d /usr/local/bin
163-
164159
- name: Write gon config to file
165160
# gon does not allow env variables in config file (https://github.com/mitchellh/gon/issues/20)
166161
run: |
@@ -187,7 +182,8 @@ jobs:
187182
AC_PASSWORD: ${{ secrets.AC_PASSWORD }}
188183
AC_PROVIDER: ${{ secrets.AC_PROVIDER }}
189184
run: |
190-
gon "${{ env.GON_CONFIG_PATH }}"
185+
go tool \
186+
github.com/bearer/gon/cmd/gon "${{ env.GON_CONFIG_PATH }}"
191187
192188
- name: Re-package binary
193189
working-directory: ${{ env.DIST_DIR }}

.github/workflows/release-go-task.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@ jobs:
111111
- name: Checkout repository
112112
uses: actions/checkout@v5
113113

114+
- name: Install Go
115+
uses: actions/setup-go@v6
116+
with:
117+
go-version-file: go.mod
118+
114119
- name: Download artifacts
115120
uses: actions/download-artifact@v6
116121
with:
@@ -151,15 +156,6 @@ jobs:
151156
-k "${{ env.KEYCHAIN_PASSWORD }}" \
152157
"${{ env.KEYCHAIN }}"
153158
154-
- name: Install gon for code signing and app notarization
155-
run: |
156-
wget \
157-
-q https://github.com/Bearer/gon/releases/download/v0.0.27/gon_macos.zip
158-
159-
unzip \
160-
gon_macos.zip \
161-
-d /usr/local/bin
162-
163159
- name: Write gon config to file
164160
# gon does not allow env variables in config file (https://github.com/mitchellh/gon/issues/20)
165161
run: |
@@ -186,7 +182,8 @@ jobs:
186182
AC_PASSWORD: ${{ secrets.AC_PASSWORD }}
187183
AC_PROVIDER: ${{ secrets.AC_PROVIDER }}
188184
run: |
189-
gon "${{ env.GON_CONFIG_PATH }}"
185+
go tool \
186+
github.com/bearer/gon/cmd/gon "${{ env.GON_CONFIG_PATH }}"
190187
191188
- name: Re-package binary
192189
working-directory: ${{ env.DIST_DIR }}

go.mod

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,12 @@ require (
3131
github.com/OneOfOne/xxhash v1.2.8 // indirect
3232
github.com/ProtonMail/go-crypto v1.1.6 // indirect
3333
github.com/a8m/envsubst v1.4.3 // indirect
34+
github.com/agext/levenshtein v1.2.1 // indirect
3435
github.com/alecthomas/chroma/v2 v2.20.0 // indirect
3536
github.com/alecthomas/participle/v2 v2.1.4 // indirect
37+
github.com/apparentlymart/go-textseg v1.0.0 // indirect
3638
github.com/arduino/go-win32-utils v1.0.0 // indirect
39+
github.com/bearer/gon v0.0.37 // indirect
3740
github.com/cespare/xxhash v1.1.0 // indirect
3841
github.com/chainguard-dev/git-urls v1.0.2 // indirect
3942
github.com/cloudflare/circl v1.6.1 // indirect
@@ -65,9 +68,14 @@ require (
6568
github.com/goccy/go-yaml v1.18.0 // indirect
6669
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
6770
github.com/golang/protobuf v1.5.4 // indirect
71+
github.com/google/go-cmp v0.7.0 // indirect
6872
github.com/google/uuid v1.6.0 // indirect
6973
github.com/h2non/filetype v1.1.3 // indirect
74+
github.com/hashicorp/errwrap v1.0.0 // indirect
75+
github.com/hashicorp/go-hclog v1.5.0 // indirect
76+
github.com/hashicorp/go-multierror v1.0.0 // indirect
7077
github.com/hashicorp/hcl v1.0.0 // indirect
78+
github.com/hashicorp/hcl/v2 v2.0.0 // indirect
7179
github.com/inconshreveable/mousetrap v1.1.0 // indirect
7280
github.com/jandelgado/gcov2lcov v1.0.4 // indirect
7381
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
@@ -86,6 +94,7 @@ require (
8694
github.com/mattn/go-runewidth v0.0.16 // indirect
8795
github.com/mattn/go-zglob v0.0.6 // indirect
8896
github.com/mikefarah/yq/v4 v4.48.1 // indirect
97+
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
8998
github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect
9099
github.com/mitchellh/mapstructure v1.5.0 // indirect
91100
github.com/muesli/cancelreader v0.2.2 // indirect
@@ -119,6 +128,7 @@ require (
119128
github.com/ulikunitz/xz v0.5.15 // indirect
120129
github.com/xanzy/ssh-agent v0.3.3 // indirect
121130
github.com/yuin/gopher-lua v1.1.1 // indirect
131+
github.com/zclconf/go-cty v1.1.0 // indirect
122132
github.com/zeebo/xxh3 v1.0.2 // indirect
123133
go.bug.st/cleanup v1.0.0 // indirect
124134
go.bug.st/downloader/v2 v2.1.1 // indirect
@@ -146,10 +156,12 @@ require (
146156
gopkg.in/warnings.v0 v0.1.2 // indirect
147157
gopkg.in/yaml.v2 v2.4.0 // indirect
148158
gopkg.in/yaml.v3 v3.0.1 // indirect
159+
howett.net/plist v0.0.0-20181124034731-591f970eefbb // indirect
149160
mvdan.cc/sh/v3 v3.10.0 // indirect
150161
)
151162

152163
tool (
164+
github.com/bearer/gon/cmd/gon
153165
github.com/go-bindata/go-bindata/go-bindata
154166
github.com/go-task/task/v3/cmd/task
155167
github.com/mikefarah/yq/v4

0 commit comments

Comments
 (0)