Skip to content

build: bump sub-store to 2.24.5 #409

build: bump sub-store to 2.24.5

build: bump sub-store to 2.24.5 #409

Workflow file for this run

name: Generate
on:
workflow_dispatch:
inputs:
enable_sniff:
description: 'Enable sniff (release)'
type: string
required: false
default: 'true'
push:
branches:
- 'main'
paths:
- 'src/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SING_BOX_VERSION: 1.13.13
SUB_STORE_VERSION: 2.24.5
ENABLE_SNIFF: ${{ github.event.inputs.enable_sniff || 'true' }}
jobs:
generate:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Install tools
run: |
sudo apt-get update -y
sudo apt-get install jsonnet just
curl -fsSL https://sing-box.app/install.sh | sh -s -- --version "${{ env.SING_BOX_VERSION }}"
curl -LSso sub-store.js "https://github.com/sub-store-org/Sub-Store/releases/download/${{ env.SUB_STORE_VERSION }}/sub-store.bundle.js"
jsonnet --version
just --version
sing-box version
- name: Generate config
run: just generate false
- name: Commit config
uses: stefanzweifel/git-auto-commit-action@v7
with:
commit_message: 'chore: update template'
file_pattern: 'public/template*.json'
commit_user_name: YanamiChan[bot]
commit_user_email: 182213109+YanamiChan[bot]@users.noreply.github.com
commit_author: YanamiChan[bot] <182213109+YanamiChan[bot]@users.noreply.github.com>
- uses: actions/setup-node@v6
with:
node-version: '20'
- name: Get sub-store config
run: echo "${{ secrets.FILE_CONFIG }}" | base64 --decode > sub-store.json
- name: Generate config
run: |
just generate ${{ env.ENABLE_SNIFF }}
python3 -m http.server 8000 --directory public/ > /dev/null 2>&1 &
sleep 1
node sub-store.js > /dev/null 2>&1 &
sleep 1
mkdir output
for platform in android windows linux-desktop; do
echo "[INFO] Generating config-$platform.json ..."
curl -LSso "config-$platform.json.tmp" "http://localhost:3000/api/file/$platform"
jq -c . "config-$platform.json.tmp" > "output/config-$platform.json"
done
# Only node info
curl -LSso output/mihomo.yaml "http://localhost:3000/download/1?target=ClashMeta"
curl -LSso output/sing-box.json "http://localhost:3000/download/1?target=sing-box"
curl -LSso output/v2ray.txt "http://localhost:3000/download/1?target=URI"
- name: Upload files
uses: ncipollo/release-action@v1
with:
artifactErrorsFailBuild: true
removeArtifacts: true
allowUpdates: true
generateReleaseNotes: false
tag: nightly
artifacts: 'output/*.json, output/mihomo.yaml, output/v2ray.txt'
prerelease: true