Skip to content

Commit 0c16bb3

Browse files
committed
update version and workflows
Signed-off-by: Nicola Murino <[email protected]>
1 parent 6b5f01b commit 0c16bb3

File tree

6 files changed

+64
-166
lines changed

6 files changed

+64
-166
lines changed

.github/workflows/development.yml

Lines changed: 7 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ permissions:
1010
contents: read
1111

1212
env:
13-
GO_VERSION: '1.24'
13+
GO_VERSION: '1.25'
1414

1515
jobs:
1616
build:
@@ -23,7 +23,7 @@ jobs:
2323
fetch-depth: 0
2424

2525
- name: Set up Go
26-
uses: actions/setup-go@v5
26+
uses: actions/setup-go@v6
2727
with:
2828
go-version: ${{ env.GO_VERSION }}
2929

@@ -57,58 +57,6 @@ jobs:
5757
name: sftpgo-plugin-eventsearch
5858
path: bin
5959

60-
sign-windows-binaries:
61-
name: Sign Windows binaries
62-
if: ${{ github.event_name != 'pull_request' }}
63-
environment: signing
64-
needs: [build]
65-
runs-on: windows-latest
66-
67-
steps:
68-
- name: Download artifact
69-
uses: actions/download-artifact@v5
70-
with:
71-
name: sftpgo-plugin-eventsearch
72-
path: ${{ github.workspace }}/bin
73-
74-
- name: Azure login
75-
uses: azure/login@v2
76-
with:
77-
client-id: ${{ secrets.AZURE_CLIENT_ID }}
78-
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
79-
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
80-
81-
- name: Sign
82-
uses: azure/[email protected]
83-
with:
84-
endpoint: https://eus.codesigning.azure.net/
85-
trusted-signing-account-name: nicola
86-
certificate-profile-name: SFTPGo
87-
files: |
88-
${{ github.workspace }}\bin\sftpgo-plugin-eventsearch-windows-x86_64.exe
89-
${{ github.workspace }}\bin\sftpgo-plugin-eventsearch-windows-arm64.exe
90-
${{ github.workspace }}\bin\sftpgo-plugin-eventsearch-windows-x86.exe
91-
file-digest: SHA256
92-
timestamp-rfc3161: http://timestamp.acs.microsoft.com
93-
timestamp-digest: SHA256
94-
exclude-environment-credential: true
95-
exclude-workload-identity-credential: true
96-
exclude-managed-identity-credential: true
97-
exclude-shared-token-cache-credential: true
98-
exclude-visual-studio-credential: true
99-
exclude-visual-studio-code-credential: true
100-
exclude-azure-cli-credential: false
101-
exclude-azure-powershell-credential: true
102-
exclude-azure-developer-cli-credential: true
103-
exclude-interactive-browser-credential: true
104-
105-
- name: Upload build artifact
106-
uses: actions/upload-artifact@v4
107-
with:
108-
name: sftpgo-plugin-eventsearch
109-
path: bin
110-
overwrite: true
111-
11260
test-providers:
11361
name: Test supported providers
11462
runs-on: ubuntu-latest
@@ -145,9 +93,9 @@ jobs:
14593
- uses: actions/checkout@v5
14694

14795
- name: Set up Go
148-
uses: actions/setup-go@v5
96+
uses: actions/setup-go@v6
14997
with:
150-
go-version: '1.24'
98+
go-version: '1.25'
15199

152100
- name: Run tests using PostgreSQL provider
153101
run: |
@@ -168,11 +116,11 @@ jobs:
168116
runs-on: ubuntu-latest
169117
steps:
170118
- name: Set up Go
171-
uses: actions/setup-go@v5
119+
uses: actions/setup-go@v6
172120
with:
173-
go-version: '1.24'
121+
go-version: '1.25'
174122
- uses: actions/checkout@v5
175123
- name: Run golangci-lint
176-
uses: golangci/golangci-lint-action@v6
124+
uses: golangci/golangci-lint-action@v8
177125
with:
178126
version: latest

.github/workflows/release.yml

Lines changed: 5 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ permissions:
99
contents: write
1010

1111
env:
12-
GO_VERSION: 1.24.6
12+
GO_VERSION: 1.25.3
1313

1414
jobs:
1515
build:
@@ -22,7 +22,7 @@ jobs:
2222
fetch-depth: 0
2323

2424
- name: Set up Go
25-
uses: actions/setup-go@v5
25+
uses: actions/setup-go@v6
2626
with:
2727
go-version: ${{ env.GO_VERSION }}
2828

@@ -35,13 +35,12 @@ jobs:
3535
FILE_VERSION=${VERSION:1}.0
3636
3737
mkdir bin
38-
mkdir win
3938
go-winres simply --arch amd64 --product-version $VERSION-$GIT_COMMIT --file-version $FILE_VERSION --file-description "SFTPGo plugin eventsearch" --product-name "SFTPGo plugin eventsearch" --copyright "AGPL-3.0" --original-filename sftpgo-plugin-eventsearch-windows-x86_64.exe --icon res/icon.ico
40-
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -trimpath -ldflags "-s -w -X github.com/sftpgo/sftpgo-plugin-eventsearch/cmd.commitHash=`git describe --always --dirty` -X github.com/sftpgo/sftpgo-plugin-eventsearch/cmd.buildDate=`date -u +%FT%TZ`" -o win/sftpgo-plugin-eventsearch-windows-x86_64.exe
39+
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -trimpath -ldflags "-s -w -X github.com/sftpgo/sftpgo-plugin-eventsearch/cmd.commitHash=`git describe --always --dirty` -X github.com/sftpgo/sftpgo-plugin-eventsearch/cmd.buildDate=`date -u +%FT%TZ`" -o bin/sftpgo-plugin-eventsearch-windows-x86_64.exe
4140
go-winres simply --arch amd64 --product-version $VERSION-$GIT_COMMIT --file-version $FILE_VERSION --file-description "SFTPGo plugin eventsearch" --product-name "SFTPGo plugin eventsearch" --copyright "AGPL-3.0" --original-filename sftpgo-plugin-eventsearch-windows-arm64.exe --icon res/icon.ico
42-
CGO_ENABLED=0 GOOS=windows GOARCH=arm64 go build -trimpath -ldflags "-s -w -X github.com/sftpgo/sftpgo-plugin-eventsearch/cmd.commitHash=`git describe --always --dirty` -X github.com/sftpgo/sftpgo-plugin-eventsearch/cmd.buildDate=`date -u +%FT%TZ`" -o win/sftpgo-plugin-eventsearch-windows-arm64.exe
41+
CGO_ENABLED=0 GOOS=windows GOARCH=arm64 go build -trimpath -ldflags "-s -w -X github.com/sftpgo/sftpgo-plugin-eventsearch/cmd.commitHash=`git describe --always --dirty` -X github.com/sftpgo/sftpgo-plugin-eventsearch/cmd.buildDate=`date -u +%FT%TZ`" -o bin/sftpgo-plugin-eventsearch-windows-arm64.exe
4342
go-winres simply --arch amd64 --product-version $VERSION-$GIT_COMMIT --file-version $FILE_VERSION --file-description "SFTPGo plugin eventsearch" --product-name "SFTPGo plugin eventsearch" --copyright "AGPL-3.0" --original-filename sftpgo-plugin-eventsearch-windows-x86.exe --icon res/icon.ico
44-
CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -trimpath -ldflags "-s -w -X github.com/sftpgo/sftpgo-plugin-eventsearch/cmd.commitHash=`git describe --always --dirty` -X github.com/sftpgo/sftpgo-plugin-eventsearch/cmd.buildDate=`date -u +%FT%TZ`" -o win/sftpgo-plugin-eventsearch-windows-x86.exe
43+
CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -trimpath -ldflags "-s -w -X github.com/sftpgo/sftpgo-plugin-eventsearch/cmd.commitHash=`git describe --always --dirty` -X github.com/sftpgo/sftpgo-plugin-eventsearch/cmd.buildDate=`date -u +%FT%TZ`" -o bin/sftpgo-plugin-eventsearch-windows-x86.exe
4544
4645
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags "-s -w -X github.com/sftpgo/sftpgo-plugin-eventsearch/cmd.commitHash=`git describe --always --dirty` -X github.com/sftpgo/sftpgo-plugin-eventsearch/cmd.buildDate=`date -u +%FT%TZ`" -o bin/sftpgo-plugin-eventsearch-linux-amd64
4746
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -trimpath -ldflags "-s -w -X github.com/sftpgo/sftpgo-plugin-eventsearch/cmd.commitHash=`git describe --always --dirty` -X github.com/sftpgo/sftpgo-plugin-eventsearch/cmd.buildDate=`date -u +%FT%TZ`" -o bin/sftpgo-plugin-eventsearch-linux-arm64
@@ -51,13 +50,6 @@ jobs:
5150
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -trimpath -ldflags "-s -w -X github.com/sftpgo/sftpgo-plugin-eventsearch/cmd.commitHash=`git describe --always --dirty` -X github.com/sftpgo/sftpgo-plugin-eventsearch/cmd.buildDate=`date -u +%FT%TZ`" -o bin/sftpgo-plugin-eventsearch-darwin-arm64
5251
shell: bash
5352

54-
- name: Upload Windows artifact
55-
uses: actions/upload-artifact@v4
56-
with:
57-
name: win
58-
path: win
59-
retention-days: 1
60-
6153
- name: Prepare vendored sources
6254
run: |
6355
VERSION=${GITHUB_REF/refs\/tags\//}
@@ -74,61 +66,3 @@ jobs:
7466
gh release view "${VERSION}"
7567
env:
7668
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
77-
78-
release-windows-binaries:
79-
name: Release Windows binaries
80-
environment: signing
81-
needs: [build]
82-
runs-on: windows-latest
83-
84-
steps:
85-
- uses: actions/checkout@v5
86-
with:
87-
fetch-depth: 0
88-
89-
- name: Download artifact
90-
uses: actions/download-artifact@v5
91-
with:
92-
name: win
93-
94-
- name: Azure login
95-
uses: azure/login@v2
96-
with:
97-
client-id: ${{ secrets.AZURE_CLIENT_ID }}
98-
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
99-
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
100-
101-
- name: Sign
102-
uses: azure/[email protected]
103-
with:
104-
endpoint: https://eus.codesigning.azure.net/
105-
trusted-signing-account-name: nicola
106-
certificate-profile-name: SFTPGo
107-
files: |
108-
${{ github.workspace }}\sftpgo-plugin-eventsearch-windows-x86_64.exe
109-
${{ github.workspace }}\sftpgo-plugin-eventsearch-windows-arm64.exe
110-
${{ github.workspace }}\sftpgo-plugin-eventsearch-windows-x86.exe
111-
file-digest: SHA256
112-
timestamp-rfc3161: http://timestamp.acs.microsoft.com
113-
timestamp-digest: SHA256
114-
exclude-environment-credential: true
115-
exclude-workload-identity-credential: true
116-
exclude-managed-identity-credential: true
117-
exclude-shared-token-cache-credential: true
118-
exclude-visual-studio-credential: true
119-
exclude-visual-studio-code-credential: true
120-
exclude-azure-cli-credential: false
121-
exclude-azure-powershell-credential: true
122-
exclude-azure-developer-cli-credential: true
123-
exclude-interactive-browser-credential: true
124-
125-
- name: Upload to release
126-
run: |
127-
VERSION=${GITHUB_REF/refs\/tags\//}
128-
gh release upload "${VERSION}" sftpgo-plugin-eventsearch-windows-x86_64.exe
129-
gh release upload "${VERSION}" sftpgo-plugin-eventsearch-windows-arm64.exe
130-
gh release upload "${VERSION}" sftpgo-plugin-eventsearch-windows-x86.exe
131-
gh release view "${VERSION}"
132-
shell: bash
133-
env:
134-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.golangci.yml

Lines changed: 44 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,54 @@
1+
version: "2"
12
run:
2-
timeout: 5m
33
issues-exit-code: 1
44
tests: true
5-
6-
7-
linters-settings:
8-
dupl:
9-
threshold: 150
10-
errcheck:
11-
check-type-assertions: false
12-
check-blank: false
13-
goconst:
14-
min-len: 3
15-
min-occurrences: 3
16-
gocyclo:
17-
min-complexity: 25
18-
gofmt:
19-
simplify: true
20-
goimports:
21-
local-prefixes: github.com/sftpgo/sftpgo-plugin-eventsearch
22-
235
linters:
246
enable:
7+
- bodyclose
8+
- dupl
259
- goconst
26-
- errcheck
27-
- gofmt
28-
- goimports
10+
- gocyclo
11+
- misspell
2912
- revive
13+
- rowserrcheck
3014
- unconvert
3115
- unparam
32-
- bodyclose
33-
- gocyclo
34-
- misspell
3516
- whitespace
36-
- dupl
37-
- rowserrcheck
38-
- govet
17+
settings:
18+
dupl:
19+
threshold: 150
20+
errcheck:
21+
check-type-assertions: false
22+
check-blank: false
23+
goconst:
24+
min-len: 3
25+
min-occurrences: 3
26+
gocyclo:
27+
min-complexity: 25
28+
exclusions:
29+
generated: lax
30+
presets:
31+
- comments
32+
- common-false-positives
33+
- legacy
34+
- std-error-handling
35+
paths:
36+
- third_party$
37+
- builtin$
38+
- examples$
39+
formatters:
40+
enable:
41+
- gofmt
42+
- goimports
43+
settings:
44+
gofmt:
45+
simplify: true
46+
goimports:
47+
local-prefixes:
48+
- github.com/sftpgo/sftpgo-plugin-eventsearch
49+
exclusions:
50+
generated: lax
51+
paths:
52+
- third_party$
53+
- builtin$
54+
- examples$

cmd/cmd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828
)
2929

3030
const (
31-
version = "1.0.20"
31+
version = "1.0.21"
3232
envPrefix = "SFTPGO_PLUGIN_EVENTSEARCH_"
3333
)
3434

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
module github.com/sftpgo/sftpgo-plugin-eventsearch
22

3-
go 1.24.0
3+
go 1.25.0
44

55
require (
66
github.com/go-sql-driver/mysql v1.9.3
77
github.com/hashicorp/go-hclog v1.6.3
88
github.com/hashicorp/go-plugin v1.7.0
99
github.com/rs/xid v1.6.0
10-
github.com/sftpgo/sdk v0.1.8
10+
github.com/sftpgo/sdk v0.1.9
1111
github.com/stretchr/testify v1.11.1
1212
github.com/urfave/cli/v2 v2.27.7
1313
gorm.io/driver/mysql v1.6.0
@@ -40,7 +40,7 @@ require (
4040
golang.org/x/sync v0.17.0 // indirect
4141
golang.org/x/sys v0.37.0 // indirect
4242
golang.org/x/text v0.30.0 // indirect
43-
google.golang.org/genproto/googleapis/rpc v0.0.0-20251007200510-49b9836ed3ff // indirect
43+
google.golang.org/genproto/googleapis/rpc v0.0.0-20251022142026-3a174f9686a8 // indirect
4444
google.golang.org/grpc v1.76.0 // indirect
4545
google.golang.org/protobuf v1.36.10 // indirect
4646
gopkg.in/yaml.v3 v3.0.1 // indirect

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ github.com/rs/xid v1.6.0 h1:fV591PaemRlL6JfRxGDEPl69wICngIQ3shQtzfy2gxU=
6666
github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0=
6767
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
6868
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
69-
github.com/sftpgo/sdk v0.1.8 h1:HAywJl9jZnigFGztA/CWLieOW+R+HH6js6o6/qYvuSY=
70-
github.com/sftpgo/sdk v0.1.8/go.mod h1:Isl0IEzS/Muvh8Fr4X+NWFsOS/fZQHRD4oPQpoY7C4g=
69+
github.com/sftpgo/sdk v0.1.9 h1:onBWfibCt34xHeKC2KFYPZ1DBqXGl9um/cAw+AVdgzY=
70+
github.com/sftpgo/sdk v0.1.9/go.mod h1:ehimvlTP+XTEiE3t1CPwWx9n7+6A6OGvMGlZ7ouvKFk=
7171
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
7272
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
7373
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
@@ -108,8 +108,8 @@ golang.org/x/text v0.30.0 h1:yznKA/E9zq54KzlzBEAWn1NXSQ8DIp/NYMy88xJjl4k=
108108
golang.org/x/text v0.30.0/go.mod h1:yDdHFIX9t+tORqspjENWgzaCVXgk0yYnYuSZ8UzzBVM=
109109
gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk=
110110
gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E=
111-
google.golang.org/genproto/googleapis/rpc v0.0.0-20251007200510-49b9836ed3ff h1:A90eA31Wq6HOMIQlLfzFwzqGKBTuaVztYu/g8sn+8Zc=
112-
google.golang.org/genproto/googleapis/rpc v0.0.0-20251007200510-49b9836ed3ff/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk=
111+
google.golang.org/genproto/googleapis/rpc v0.0.0-20251022142026-3a174f9686a8 h1:M1rk8KBnUsBDg1oPGHNCxG4vc1f49epmTO7xscSajMk=
112+
google.golang.org/genproto/googleapis/rpc v0.0.0-20251022142026-3a174f9686a8/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk=
113113
google.golang.org/grpc v1.76.0 h1:UnVkv1+uMLYXoIz6o7chp59WfQUYA2ex/BXQ9rHZu7A=
114114
google.golang.org/grpc v1.76.0/go.mod h1:Ju12QI8M6iQJtbcsV+awF5a4hfJMLi4X0JLo94ULZ6c=
115115
google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE=

0 commit comments

Comments
 (0)