Skip to content

Commit

Permalink
chore: migrate goreleaser v2
Browse files Browse the repository at this point in the history
  • Loading branch information
starudream committed Jul 4, 2024
1 parent 7290d9f commit da9cf0f
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: stable
- uses: goreleaser/goreleaser-action@v5
- uses: goreleaser/goreleaser-action@v6
with:
args: build --clean --snapshot
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
registry: ghcr.io
username: starudream
password: ${{ secrets.GITHUB_TOKEN }}
- uses: goreleaser/goreleaser-action@v5
- uses: goreleaser/goreleaser-action@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
2 changes: 2 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
version: 2

env:
- CGO_ENABLED=0
- GO111MODULE=on
Expand Down
5 changes: 2 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.22

require (
github.com/starudream/go-lib/cobra/v2 v2.0.10
github.com/starudream/go-lib/core/v2 v2.0.25
github.com/starudream/go-lib/core/v2 v2.0.26
github.com/starudream/go-lib/cron/v2 v2.0.9
github.com/starudream/go-lib/ntfy/v2 v2.0.11
github.com/starudream/go-lib/resty/v2 v2.0.12
Expand Down Expand Up @@ -38,11 +38,10 @@ require (
github.com/rivo/uniseg v0.4.7 // indirect
github.com/robfig/cron/v3 v3.0.1 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/samber/lo v1.39.0 // indirect
github.com/samber/lo v1.44.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/spf13/cobra v1.8.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect
golang.org/x/net v0.26.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/text v0.16.0 // indirect
Expand Down
10 changes: 4 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/f
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/samber/lo v1.39.0 h1:4gTz1wUhNYLhFSKl6O+8peW0v2F4BCY034GRpU9WnuA=
github.com/samber/lo v1.39.0/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA=
github.com/samber/lo v1.44.0 h1:5il56KxRE+GHsm1IR+sZ/6J42NODigFiqCWpSc2dybA=
github.com/samber/lo v1.44.0/go.mod h1:RmDH9Ct32Qy3gduHQuKJ3gW1fMHAnE/fAzQuf6He5cU=
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e h1:MRM5ITcdelLK2j1vwZ3Je0FKVCfqOLp5zO6trqMLYs0=
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e/go.mod h1:XV66xRDqSt+GTGFMVlhk3ULuV0y9ZmzeVGR4mloJI3M=
github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0=
Expand All @@ -71,8 +71,8 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/starudream/go-lib/cobra/v2 v2.0.10 h1:6heRJiVGvICaz9PQS7+71k2Yj5K50uBBhgoBJSIRfWU=
github.com/starudream/go-lib/cobra/v2 v2.0.10/go.mod h1:RLxUrNhJHcGNv3rhlo61/2hv8kNioPbq+olegLfhDSI=
github.com/starudream/go-lib/core/v2 v2.0.25 h1:/VUsrzBNxsohNct+Xkb+qB5gr7DcG5Yr9GcZXmfg5SI=
github.com/starudream/go-lib/core/v2 v2.0.25/go.mod h1:JPxHpbIpWeSmPQRdVUmC5RO50rei2H6SHPeTxmNgqZU=
github.com/starudream/go-lib/core/v2 v2.0.26 h1:O2AilbtD3mXPIwSIlCFmI58H6FZ0KIwFwhNe0GyxkiM=
github.com/starudream/go-lib/core/v2 v2.0.26/go.mod h1:ip53MNJBvaiHJLfjvpSbW4b1T+krUOOwH2gRyN4B0ts=
github.com/starudream/go-lib/cron/v2 v2.0.9 h1:kHvzOsWpTUL5Ba+7eGpFaws0jK2J8SJF6btDue40qgY=
github.com/starudream/go-lib/cron/v2 v2.0.9/go.mod h1:GMuJRoXHdKtOXfJd52biroHTDeEH3VbaqW/EgtC3rkA=
github.com/starudream/go-lib/ntfy/v2 v2.0.11 h1:VfE9VdVky+Wf0HinqWCtrl/V8wPgUlRb92sRqPFumsQ=
Expand All @@ -90,8 +90,6 @@ golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDf
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI=
golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM=
golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 h1:yixxcjnhBmY0nkL253HFVIm0JsFHwrHdT3Yh6szTnfY=
golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
Expand Down
4 changes: 3 additions & 1 deletion job/forum.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ post:
continue
}
record.PostView++
time.Sleep(100 * time.Millisecond)
}
if record.PostUpvote < PostUpvote && !p.IsUpvote() {
e := miyoushe.UpvotePost(pid, false, account)
Expand All @@ -165,6 +166,7 @@ post:
}
slog.Debug("upvote post: %s (%s) %s", p.Post.Subject, pid, p.User.Nickname)
record.PostUpvote++
time.Sleep(100 * time.Millisecond)
}
if record.PostShare < PostShare {
_, e := miyoushe.SharePost(pid, account)
Expand All @@ -173,8 +175,8 @@ post:
continue
}
record.PostShare++
time.Sleep(100 * time.Millisecond)
}
// avoid too fast
time.Sleep(500 * time.Millisecond)
}

Expand Down

0 comments on commit da9cf0f

Please sign in to comment.