From 49d417b817772de1202801e0aedee1307d8f5e2c Mon Sep 17 00:00:00 2001 From: gongyun Date: Fri, 15 May 2026 11:18:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9E=84=E5=BB=BA=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/build.yml | 91 +++++++++++++++++++++----------------- 1 file changed, 51 insertions(+), 40 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index baddab1..7740b56 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -10,6 +10,7 @@ on: workflow_dispatch: permissions: + actions: read contents: read jobs: @@ -20,6 +21,11 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + repository: gongyun/app + ref: ${{ github.ref }} + token: ${{ secrets.GITEA_TOKEN }} + github-server-url: https://git.saont.net - name: Set up Java uses: actions/setup-java@v4 @@ -69,45 +75,50 @@ jobs: name: android-release path: gongyun-app-release.apk - windows: - name: Build Windows - runs-on: windows-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up Flutter - uses: subosito/flutter-action@v2 - with: - channel: stable - cache: true - - - name: Enable Windows desktop - run: flutter config --enable-windows-desktop - - - name: Install dependencies - run: flutter pub get - - - name: Build Windows release - run: flutter build windows --release - - - name: Package Windows release - shell: pwsh - run: Compress-Archive -Path build\windows\x64\runner\Release\* -DestinationPath gongyun.zip -Force - - - name: Upload Windows artifact - uses: actions/upload-artifact@v4 - with: - name: windows-release - path: gongyun.zip + # windows: + # name: Build Windows + # runs-on: windows-latest + # + # steps: + # - name: Checkout + # uses: actions/checkout@v4 + # with: + # repository: gongyun/app + # ref: ${{ github.ref }} + # token: ${{ secrets.GITEA_TOKEN }} + # github-server-url: https://git.saont.net + # + # - name: Set up Flutter + # uses: subosito/flutter-action@v2 + # with: + # channel: stable + # cache: true + # + # - name: Enable Windows desktop + # run: flutter config --enable-windows-desktop + # + # - name: Install dependencies + # run: flutter pub get + # + # - name: Build Windows release + # run: flutter build windows --release + # + # - name: Package Windows release + # shell: pwsh + # run: Compress-Archive -Path build\windows\x64\runner\Release\* -DestinationPath gongyun.zip -Force + # + # - name: Upload Windows artifact + # uses: actions/upload-artifact@v4 + # with: + # name: windows-release + # path: gongyun.zip release: name: Publish Release runs-on: ubuntu-latest needs: - android - - windows + # - windows if: startsWith(github.ref, 'refs/tags/') permissions: actions: read @@ -121,11 +132,11 @@ jobs: name: android-release path: dist - - name: Download Windows artifact - uses: actions/download-artifact@v4 - with: - name: windows-release - path: dist + # - name: Download Windows artifact + # uses: actions/download-artifact@v4 + # with: + # name: windows-release + # path: dist - name: Publish Gitea release shell: bash @@ -200,7 +211,7 @@ jobs: python3 - <<'PY' > asset-ids-to-delete.txt import json - names = {"gongyun-app-release.apk", "gongyun.zip"} + names = {"gongyun-app-release.apk"} with open("assets.json", encoding="utf-8") as f: for asset in json.load(f): if asset.get("name") in names: @@ -229,4 +240,4 @@ jobs: } upload_asset dist/gongyun-app-release.apk - upload_asset dist/gongyun.zip + # upload_asset dist/gongyun.zip