mirror of
https://github.com/bestnite/sub2sing-box.git
synced 2025-10-25 16:51:01 +00:00
workflow: fix goreleaser config and containerfile
This commit is contained in:
2
.github/workflows/docker.yml
vendored
2
.github/workflows/docker.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
with:
|
||||
images: |
|
||||
nite07/sub2sing-box
|
||||
ghcr.io/nitezs/sub2sing-box
|
||||
ghcr.io/bestnite/sub2sing-box
|
||||
tags: |
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
|
||||
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
@@ -13,10 +13,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
uses: actions/setup-go@v5
|
||||
|
||||
- name: Install UPX
|
||||
uses: crazy-max/ghaction-upx@v3
|
||||
@@ -24,7 +24,7 @@ jobs:
|
||||
install-only: true
|
||||
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v5
|
||||
uses: goreleaser/goreleaser-action@v6
|
||||
with:
|
||||
distribution: goreleaser
|
||||
version: latest
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
version: 2
|
||||
project_name: sub2sing-box
|
||||
builds:
|
||||
- env:
|
||||
@@ -9,16 +10,15 @@ builds:
|
||||
goarch:
|
||||
- amd64
|
||||
- arm64
|
||||
- arm
|
||||
- "386"
|
||||
ldflags:
|
||||
- -s -w -X github.com/nitezs/sub2sing-box/constant.Version={{ .Version }}
|
||||
- -s -w -X github.com/bestnite/sub2sing-box/constant.Version={{ .Version }}
|
||||
flags:
|
||||
- -trimpath
|
||||
archives:
|
||||
- format: tar.gz
|
||||
- formats: ["tar.gz"]
|
||||
format_overrides:
|
||||
- format: zip
|
||||
- formats: ["zip"]
|
||||
goos: windows
|
||||
wrap_in_directory: true
|
||||
files:
|
||||
@@ -30,3 +30,16 @@ release:
|
||||
upx:
|
||||
- enabled: true
|
||||
compress: best
|
||||
nfpms:
|
||||
- id: sub2sing-box
|
||||
homepage: https://github.com/bestnite/sub2sing-box
|
||||
maintainer: Nite <admin@nite07.com>
|
||||
license: "MIT"
|
||||
formats:
|
||||
- apk
|
||||
- deb
|
||||
- rpm
|
||||
- termux.deb
|
||||
- archlinux
|
||||
provides:
|
||||
- sub2sing-box
|
||||
|
||||
@@ -5,7 +5,7 @@ WORKDIR /app
|
||||
COPY . .
|
||||
RUN go mod download
|
||||
ARG version
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w -X github.com/nitezs/sub2sing-box/constant.Version=${version}" -o sub2sing-box .
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w -X github.com/bestnite/sub2sing-box/constant.Version=${version}" -o sub2sing-box .
|
||||
WORKDIR /app
|
||||
|
||||
FROM alpine:latest
|
||||
@@ -3,9 +3,9 @@ package handler
|
||||
import (
|
||||
"encoding/json"
|
||||
|
||||
"github.com/nitezs/sub2sing-box/common"
|
||||
"github.com/nitezs/sub2sing-box/model"
|
||||
"github.com/nitezs/sub2sing-box/util"
|
||||
"github.com/bestnite/sub2sing-box/common"
|
||||
"github.com/bestnite/sub2sing-box/model"
|
||||
"github.com/bestnite/sub2sing-box/util"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
"github.com/nitezs/sub2sing-box/api/handler"
|
||||
"github.com/bestnite/sub2sing-box/api/handler"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/nitezs/sub2sing-box/common"
|
||||
"github.com/nitezs/sub2sing-box/model"
|
||||
"github.com/bestnite/sub2sing-box/common"
|
||||
"github.com/bestnite/sub2sing-box/model"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"github.com/nitezs/sub2sing-box/api"
|
||||
"github.com/bestnite/sub2sing-box/api"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
@@ -3,7 +3,7 @@ package cmd
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/nitezs/sub2sing-box/constant"
|
||||
"github.com/bestnite/sub2sing-box/constant"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
@@ -12,10 +12,10 @@ import (
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/nitezs/sub2sing-box/constant"
|
||||
"github.com/nitezs/sub2sing-box/model"
|
||||
"github.com/nitezs/sub2sing-box/parser"
|
||||
"github.com/nitezs/sub2sing-box/util"
|
||||
"github.com/bestnite/sub2sing-box/constant"
|
||||
"github.com/bestnite/sub2sing-box/model"
|
||||
"github.com/bestnite/sub2sing-box/parser"
|
||||
"github.com/bestnite/sub2sing-box/util"
|
||||
box "github.com/sagernet/sing-box"
|
||||
C "github.com/sagernet/sing-box/constant"
|
||||
"github.com/sagernet/sing-box/include"
|
||||
|
||||
2
go.mod
2
go.mod
@@ -1,4 +1,4 @@
|
||||
module github.com/nitezs/sub2sing-box
|
||||
module github.com/bestnite/sub2sing-box
|
||||
|
||||
go 1.25
|
||||
|
||||
|
||||
2
main.go
2
main.go
@@ -3,7 +3,7 @@ package main
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/nitezs/sub2sing-box/cmd"
|
||||
"github.com/bestnite/sub2sing-box/cmd"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -5,8 +5,8 @@ import (
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"github.com/nitezs/sub2sing-box/constant"
|
||||
"github.com/nitezs/sub2sing-box/model"
|
||||
"github.com/bestnite/sub2sing-box/constant"
|
||||
"github.com/bestnite/sub2sing-box/model"
|
||||
"github.com/sagernet/sing-box/option"
|
||||
)
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/nitezs/sub2sing-box/constant"
|
||||
"github.com/nitezs/sub2sing-box/model"
|
||||
"github.com/bestnite/sub2sing-box/constant"
|
||||
"github.com/bestnite/sub2sing-box/model"
|
||||
"github.com/sagernet/sing-box/option"
|
||||
"github.com/sagernet/sing/common/byteformats"
|
||||
)
|
||||
|
||||
@@ -5,8 +5,8 @@ import (
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"github.com/nitezs/sub2sing-box/constant"
|
||||
"github.com/nitezs/sub2sing-box/model"
|
||||
"github.com/bestnite/sub2sing-box/constant"
|
||||
"github.com/bestnite/sub2sing-box/model"
|
||||
"github.com/sagernet/sing-box/option"
|
||||
)
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package parser
|
||||
|
||||
import (
|
||||
"github.com/nitezs/sub2sing-box/constant"
|
||||
"github.com/nitezs/sub2sing-box/model"
|
||||
"github.com/bestnite/sub2sing-box/constant"
|
||||
"github.com/bestnite/sub2sing-box/model"
|
||||
)
|
||||
|
||||
var ParserMap map[string]func(string) (model.Outbound, error) = map[string]func(string) (model.Outbound, error){
|
||||
|
||||
@@ -5,9 +5,9 @@ import (
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"github.com/nitezs/sub2sing-box/constant"
|
||||
"github.com/nitezs/sub2sing-box/model"
|
||||
"github.com/nitezs/sub2sing-box/util"
|
||||
"github.com/bestnite/sub2sing-box/constant"
|
||||
"github.com/bestnite/sub2sing-box/model"
|
||||
"github.com/bestnite/sub2sing-box/util"
|
||||
"github.com/sagernet/sing-box/option"
|
||||
)
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ import (
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"github.com/nitezs/sub2sing-box/constant"
|
||||
"github.com/nitezs/sub2sing-box/model"
|
||||
"github.com/nitezs/sub2sing-box/util"
|
||||
"github.com/bestnite/sub2sing-box/constant"
|
||||
"github.com/bestnite/sub2sing-box/model"
|
||||
"github.com/bestnite/sub2sing-box/util"
|
||||
"github.com/sagernet/sing-box/option"
|
||||
)
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ import (
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"github.com/nitezs/sub2sing-box/constant"
|
||||
"github.com/nitezs/sub2sing-box/model"
|
||||
"github.com/bestnite/sub2sing-box/constant"
|
||||
"github.com/bestnite/sub2sing-box/model"
|
||||
|
||||
"github.com/sagernet/sing-box/option"
|
||||
"github.com/sagernet/sing/common/json/badoption"
|
||||
|
||||
@@ -5,8 +5,8 @@ import (
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"github.com/nitezs/sub2sing-box/constant"
|
||||
"github.com/nitezs/sub2sing-box/model"
|
||||
"github.com/bestnite/sub2sing-box/constant"
|
||||
"github.com/bestnite/sub2sing-box/model"
|
||||
"github.com/sagernet/sing-box/option"
|
||||
"github.com/sagernet/sing/common/json/badoption"
|
||||
)
|
||||
|
||||
@@ -6,9 +6,9 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/nitezs/sub2sing-box/constant"
|
||||
"github.com/nitezs/sub2sing-box/model"
|
||||
"github.com/nitezs/sub2sing-box/util"
|
||||
"github.com/bestnite/sub2sing-box/constant"
|
||||
"github.com/bestnite/sub2sing-box/model"
|
||||
"github.com/bestnite/sub2sing-box/util"
|
||||
"github.com/sagernet/sing-box/option"
|
||||
"github.com/sagernet/sing/common/json/badoption"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user