diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 36e18463..72c4c2c0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -120,7 +120,6 @@ jobs: tag_name: pre-release body_path: changelog.md files: | - bin/latest.yml bin/dist/* prerelease: true @@ -131,6 +130,41 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + fetch-depth: '0' + fetch-tags: 'true' + + - name: Generate Changelog + env: + API_URL: ${{ secrets.API_URL }} + API_KEY: ${{ secrets.API_KEY }} + run: | + TEXT=$(git log v$(jq -r .version package.json)..HEAD --pretty=format:%s | grep -v '[0-9]\+\.[0-9]\+\.[0-9]\+$' | sed ':a;N;$!ba;s/\n/\\n/g') + QUESTION="Translate into Chinese:\n"""\n$TEXT\n"""" + PAYLOAD=$(cat < changelog.md + echo $RESPONSE | jq .choices[0].message.content -r | sed 's/\\n/\n/g' >> changelog.md - name: Update Version run: | @@ -148,6 +182,14 @@ jobs: git commit -m "Update version to $CLEAN_VERSION" git push + - name: Setup pnpm + run: npm install -g pnpm + + - name: Install Dependencies and Prepare + run: | + pnpm i + pnpm updater + - uses: actions/download-artifact@v4 with: path: bin/ @@ -165,7 +207,7 @@ jobs: uses: softprops/action-gh-release@v2 with: tag_name: ${{ github.event.inputs.version != '' && github.event.inputs.version || github.ref }} - body_path: bin/changelog.md + body_path: changelog.md files: | - bin/latest.yml + latest.yml bin/dist/* \ No newline at end of file diff --git a/src/renderer/src/components/resources/proxy-provider.tsx b/src/renderer/src/components/resources/proxy-provider.tsx index 9a97c4bd..73b06e9f 100644 --- a/src/renderer/src/components/resources/proxy-provider.tsx +++ b/src/renderer/src/components/resources/proxy-provider.tsx @@ -50,11 +50,7 @@ const ProxyProvider: React.FC = () => { if (!data) return [] return Object.values(data.providers) .map(provider => { - if (provider.vehicleType === 'Inline' || (provider.subscriptionInfo && - provider.subscriptionInfo.Upload === 0 && - provider.subscriptionInfo.Download === 0 && - provider.subscriptionInfo.Total === 0 && - provider.subscriptionInfo.Expire === 0)) { + if (provider.vehicleType === 'Inline' || provider.vehicleType === 'File') { return { ...provider, subscriptionInfo: null