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:
|
with:
|
||||||
images: |
|
images: |
|
||||||
nite07/sub2sing-box
|
nite07/sub2sing-box
|
||||||
ghcr.io/nitezs/sub2sing-box
|
ghcr.io/bestnite/sub2sing-box
|
||||||
tags: |
|
tags: |
|
||||||
type=semver,pattern={{version}}
|
type=semver,pattern={{version}}
|
||||||
type=semver,pattern={{major}}.{{minor}}
|
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
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v4
|
uses: actions/setup-go@v5
|
||||||
|
|
||||||
- name: Install UPX
|
- name: Install UPX
|
||||||
uses: crazy-max/ghaction-upx@v3
|
uses: crazy-max/ghaction-upx@v3
|
||||||
@@ -24,7 +24,7 @@ jobs:
|
|||||||
install-only: true
|
install-only: true
|
||||||
|
|
||||||
- name: Run GoReleaser
|
- name: Run GoReleaser
|
||||||
uses: goreleaser/goreleaser-action@v5
|
uses: goreleaser/goreleaser-action@v6
|
||||||
with:
|
with:
|
||||||
distribution: goreleaser
|
distribution: goreleaser
|
||||||
version: latest
|
version: latest
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
version: 2
|
||||||
project_name: sub2sing-box
|
project_name: sub2sing-box
|
||||||
builds:
|
builds:
|
||||||
- env:
|
- env:
|
||||||
@@ -9,16 +10,15 @@ builds:
|
|||||||
goarch:
|
goarch:
|
||||||
- amd64
|
- amd64
|
||||||
- arm64
|
- arm64
|
||||||
- arm
|
|
||||||
- "386"
|
- "386"
|
||||||
ldflags:
|
ldflags:
|
||||||
- -s -w -X github.com/nitezs/sub2sing-box/constant.Version={{ .Version }}
|
- -s -w -X github.com/bestnite/sub2sing-box/constant.Version={{ .Version }}
|
||||||
flags:
|
flags:
|
||||||
- -trimpath
|
- -trimpath
|
||||||
archives:
|
archives:
|
||||||
- format: tar.gz
|
- formats: ["tar.gz"]
|
||||||
format_overrides:
|
format_overrides:
|
||||||
- format: zip
|
- formats: ["zip"]
|
||||||
goos: windows
|
goos: windows
|
||||||
wrap_in_directory: true
|
wrap_in_directory: true
|
||||||
files:
|
files:
|
||||||
@@ -30,3 +30,16 @@ release:
|
|||||||
upx:
|
upx:
|
||||||
- enabled: true
|
- enabled: true
|
||||||
compress: best
|
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 . .
|
COPY . .
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
ARG version
|
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
|
WORKDIR /app
|
||||||
|
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
@@ -3,9 +3,9 @@ package handler
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
"github.com/nitezs/sub2sing-box/common"
|
"github.com/bestnite/sub2sing-box/common"
|
||||||
"github.com/nitezs/sub2sing-box/model"
|
"github.com/bestnite/sub2sing-box/model"
|
||||||
"github.com/nitezs/sub2sing-box/util"
|
"github.com/bestnite/sub2sing-box/util"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/nitezs/sub2sing-box/api/handler"
|
"github.com/bestnite/sub2sing-box/api/handler"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/nitezs/sub2sing-box/common"
|
"github.com/bestnite/sub2sing-box/common"
|
||||||
"github.com/nitezs/sub2sing-box/model"
|
"github.com/bestnite/sub2sing-box/model"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/nitezs/sub2sing-box/api"
|
"github.com/bestnite/sub2sing-box/api"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package cmd
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/nitezs/sub2sing-box/constant"
|
"github.com/bestnite/sub2sing-box/constant"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -12,10 +12,10 @@ import (
|
|||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/nitezs/sub2sing-box/constant"
|
"github.com/bestnite/sub2sing-box/constant"
|
||||||
"github.com/nitezs/sub2sing-box/model"
|
"github.com/bestnite/sub2sing-box/model"
|
||||||
"github.com/nitezs/sub2sing-box/parser"
|
"github.com/bestnite/sub2sing-box/parser"
|
||||||
"github.com/nitezs/sub2sing-box/util"
|
"github.com/bestnite/sub2sing-box/util"
|
||||||
box "github.com/sagernet/sing-box"
|
box "github.com/sagernet/sing-box"
|
||||||
C "github.com/sagernet/sing-box/constant"
|
C "github.com/sagernet/sing-box/constant"
|
||||||
"github.com/sagernet/sing-box/include"
|
"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
|
go 1.25
|
||||||
|
|
||||||
|
|||||||
2
main.go
2
main.go
@@ -3,7 +3,7 @@ package main
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/nitezs/sub2sing-box/cmd"
|
"github.com/bestnite/sub2sing-box/cmd"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"net/url"
|
"net/url"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/nitezs/sub2sing-box/constant"
|
"github.com/bestnite/sub2sing-box/constant"
|
||||||
"github.com/nitezs/sub2sing-box/model"
|
"github.com/bestnite/sub2sing-box/model"
|
||||||
"github.com/sagernet/sing-box/option"
|
"github.com/sagernet/sing-box/option"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/nitezs/sub2sing-box/constant"
|
"github.com/bestnite/sub2sing-box/constant"
|
||||||
"github.com/nitezs/sub2sing-box/model"
|
"github.com/bestnite/sub2sing-box/model"
|
||||||
"github.com/sagernet/sing-box/option"
|
"github.com/sagernet/sing-box/option"
|
||||||
"github.com/sagernet/sing/common/byteformats"
|
"github.com/sagernet/sing/common/byteformats"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"net/url"
|
"net/url"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/nitezs/sub2sing-box/constant"
|
"github.com/bestnite/sub2sing-box/constant"
|
||||||
"github.com/nitezs/sub2sing-box/model"
|
"github.com/bestnite/sub2sing-box/model"
|
||||||
"github.com/sagernet/sing-box/option"
|
"github.com/sagernet/sing-box/option"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package parser
|
package parser
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/nitezs/sub2sing-box/constant"
|
"github.com/bestnite/sub2sing-box/constant"
|
||||||
"github.com/nitezs/sub2sing-box/model"
|
"github.com/bestnite/sub2sing-box/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
var ParserMap map[string]func(string) (model.Outbound, error) = map[string]func(string) (model.Outbound, error){
|
var ParserMap map[string]func(string) (model.Outbound, error) = map[string]func(string) (model.Outbound, error){
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import (
|
|||||||
"net/url"
|
"net/url"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/nitezs/sub2sing-box/constant"
|
"github.com/bestnite/sub2sing-box/constant"
|
||||||
"github.com/nitezs/sub2sing-box/model"
|
"github.com/bestnite/sub2sing-box/model"
|
||||||
"github.com/nitezs/sub2sing-box/util"
|
"github.com/bestnite/sub2sing-box/util"
|
||||||
"github.com/sagernet/sing-box/option"
|
"github.com/sagernet/sing-box/option"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import (
|
|||||||
"net/url"
|
"net/url"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/nitezs/sub2sing-box/constant"
|
"github.com/bestnite/sub2sing-box/constant"
|
||||||
"github.com/nitezs/sub2sing-box/model"
|
"github.com/bestnite/sub2sing-box/model"
|
||||||
"github.com/nitezs/sub2sing-box/util"
|
"github.com/bestnite/sub2sing-box/util"
|
||||||
"github.com/sagernet/sing-box/option"
|
"github.com/sagernet/sing-box/option"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"net/url"
|
"net/url"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/nitezs/sub2sing-box/constant"
|
"github.com/bestnite/sub2sing-box/constant"
|
||||||
"github.com/nitezs/sub2sing-box/model"
|
"github.com/bestnite/sub2sing-box/model"
|
||||||
|
|
||||||
"github.com/sagernet/sing-box/option"
|
"github.com/sagernet/sing-box/option"
|
||||||
"github.com/sagernet/sing/common/json/badoption"
|
"github.com/sagernet/sing/common/json/badoption"
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"net/url"
|
"net/url"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/nitezs/sub2sing-box/constant"
|
"github.com/bestnite/sub2sing-box/constant"
|
||||||
"github.com/nitezs/sub2sing-box/model"
|
"github.com/bestnite/sub2sing-box/model"
|
||||||
"github.com/sagernet/sing-box/option"
|
"github.com/sagernet/sing-box/option"
|
||||||
"github.com/sagernet/sing/common/json/badoption"
|
"github.com/sagernet/sing/common/json/badoption"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/nitezs/sub2sing-box/constant"
|
"github.com/bestnite/sub2sing-box/constant"
|
||||||
"github.com/nitezs/sub2sing-box/model"
|
"github.com/bestnite/sub2sing-box/model"
|
||||||
"github.com/nitezs/sub2sing-box/util"
|
"github.com/bestnite/sub2sing-box/util"
|
||||||
"github.com/sagernet/sing-box/option"
|
"github.com/sagernet/sing-box/option"
|
||||||
"github.com/sagernet/sing/common/json/badoption"
|
"github.com/sagernet/sing/common/json/badoption"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user