世界 преди 1 година
родител
ревизия
76f20482f7

+ 8 - 0
.github/workflows/linux.yml

@@ -17,6 +17,12 @@ jobs:
         uses: actions/setup-go@v5
         with:
           go-version: ^1.22
+      - name: Extract signing key
+        run: |-
+          mkdir -p $HOME/.gnupg
+          cat > $HOME/.gnupg/sagernet.key <<EOF
+          ${{ secrets.GPG_KEY }}
+          EOF
       - name: Publish release
         uses: goreleaser/goreleaser-action@v5
         with:
@@ -27,3 +33,5 @@ jobs:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
           GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
           FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
+          NFPM_KEY_PATH: ${{ env.Home }}/.gnupg/sagernet.key
+          NFPM_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

+ 10 - 3
.goreleaser.fury.yaml

@@ -55,6 +55,14 @@ nfpms:
         dst: /usr/lib/systemd/system/[email protected]
       - src: LICENSE
         dst: /usr/share/licenses/sing-box/LICENSE
+    deb:
+      signature:
+        key_file: "{{ .Env.NFPM_KEY_PATH }}"
+      fields:
+        Bugs: https://github.com/SagerNet/sing-box/issues
+    rpm:
+      signature:
+        key_file: "{{ .Env.NFPM_KEY_PATH }}"
     conflicts:
       - sing-box-beta
   - id: package_beta
@@ -72,9 +80,8 @@ furies:
   - account: sagernet
     ids:
       - package
-    skip: "{{ .Prerelease }}"
+    disable: "{{ not (not .Prerelease) }}"
   - account: sagernet
     ids:
       - package_beta
-    skip: "{{ not .Prerelease }}"
-
+    disable: "{{ not .Prerelease }}"

+ 2 - 0
.goreleaser.yaml

@@ -136,6 +136,8 @@ nfpms:
     deb:
       signature:
         key_file: "{{ .Env.NFPM_KEY_PATH }}"
+      fields:
+        Bugs: https://github.com/SagerNet/sing-box/issues
     rpm:
       signature:
         key_file: "{{ .Env.NFPM_KEY_PATH }}"

+ 3 - 3
docs/installation/package-manager.md

@@ -9,7 +9,7 @@ icon: material/package
 === ":material-debian: Debian / APT"
 
     ```bash
-    sudo curl -fsSL https://deb.sagernet.org/gpg.key -o /etc/apt/keyrings/sagernet.asc
+    sudo curl -fsSL https://sing-box.app/gpg.key -o /etc/apt/keyrings/sagernet.asc
     sudo chmod a+r /etc/apt/keyrings/sagernet.asc
     echo "deb [arch=`dpkg --print-architecture` signed-by=/etc/apt/keyrings/sagernet.asc] https://deb.sagernet.org/ * *" | \
       sudo tee /etc/apt/sources.list.d/sagernet.list > /dev/null
@@ -21,7 +21,7 @@ icon: material/package
 
     ```bash
     sudo dnf -y install dnf-plugins-core
-    sudo dnf config-manager --add-repo https://sing-box.app/rpm.repo
+    sudo dnf config-manager --add-repo https://sing-box.app/sing-box.repo
     sudo dnf install sing-box # or sing-box-beta
     ```
 
@@ -29,7 +29,7 @@ icon: material/package
 
     ```bash
     sudo yum install -y yum-utils
-    sudo yum-config-manager --add-repo https://sing-box.app/rpm.repo
+    sudo yum-config-manager --add-repo https://sing-box.app/sing-box.repo
     sudo yum install sing-box # or sing-box-beta
     ```
 

+ 3 - 3
docs/installation/package-manager.zh.md

@@ -9,7 +9,7 @@ icon: material/package
 === ":material-debian: Debian / APT"
 
     ```bash
-    sudo curl -fsSL https://deb.sagernet.org/gpg.key -o /etc/apt/keyrings/sagernet.asc
+    sudo curl -fsSL https://sing-box.app/gpg.key -o /etc/apt/keyrings/sagernet.asc
     sudo chmod a+r /etc/apt/keyrings/sagernet.asc
     echo "deb [arch=`dpkg --print-architecture` signed-by=/etc/apt/keyrings/sagernet.asc] https://deb.sagernet.org/ * *" | \
       sudo tee /etc/apt/sources.list.d/sagernet.list > /dev/null
@@ -21,7 +21,7 @@ icon: material/package
 
     ```bash
     sudo dnf -y install dnf-plugins-core
-    sudo dnf config-manager --add-repo https://sing-box.app/rpm.repo
+    sudo dnf config-manager --add-repo https://sing-box.app/sing-box.repo
     sudo dnf install sing-box # or sing-box-beta
     ```
 
@@ -29,7 +29,7 @@ icon: material/package
 
     ```bash
     sudo yum install -y yum-utils
-    sudo yum-config-manager --add-repo https://sing-box.app/rpm.repo
+    sudo yum-config-manager --add-repo https://sing-box.app/sing-box.repo
     sudo yum install sing-box # or sing-box-beta
     ```
 

+ 0 - 6
docs/installation/tools/rpm.repo

@@ -1,6 +0,0 @@
-[sing-box]
-name=sing-box
-baseurl=https://rpm.sagernet.org/
-enabled=1
-gpgcheck=1
-gpgkey=https://deb.sagernet.org/gpg.key

+ 8 - 0
docs/installation/tools/sing-box.repo

@@ -0,0 +1,8 @@
+[sing-box]
+name=sing-box
+baseurl=https://rpm.sagernet.org/
+metalink=https://sing-box.app/sing-box.repo
+enabled=1
+repo_gpgcheck=1
+gpgcheck=1
+gpgkey=https://sing-box.app/gpg.key