├── README.md └── .github └── workflows └── ci.yml /README.md: -------------------------------------------------------------------------------- 1 | # SBCI 2 | SB CI! 3 | 4 | 真的,SB CI 5 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | tags: 6 | - "*" 7 | workflow_dispatch: 8 | 9 | permissions: 10 | contents: write 11 | 12 | jobs: 13 | build: 14 | strategy: 15 | matrix: 16 | os: [windows-latest, ubuntu-latest, macos-13, macos-latest] 17 | # os: [windows-latest, ubuntu-latest, macos-13, macos-latest, windows-11-arm] 18 | include: 19 | - os: windows-latest 20 | build: BHYG-Windows.exe 21 | - os: ubuntu-latest 22 | build: BHYG-Linux 23 | - os: macos-13 24 | build: BHYG-macOS-Intel 25 | - os: macos-latest 26 | build: BHYG-macOS-Apple_Silicon 27 | # - os: windows-11-arm 28 | # build: BHYG-Windows-arm.exe 29 | runs-on: ${{ matrix.os }} 30 | env: 31 | version: ${{ github.ref_name }} 32 | steps: 33 | - name: Checkout 34 | uses: actions/checkout@v4 35 | with: 36 | repository: biliticket/SB 37 | token: ${{ secrets.SBCI_TOKEN }} 38 | 39 | 40 | - name: Setup Python 41 | uses: actions/setup-python@v5 42 | with: 43 | python-version: 3.12 44 | 45 | - name: Install dependencies 46 | run: pip install -r requirements.txt 47 | 48 | - name: Install Cython 49 | run: pip install Cython 50 | 51 | - name: Run Cython 52 | run: python cythonize.py build_ext --inplace 53 | 54 | - name: Remove source code 55 | if: matrix.os == 'windows-latest' 56 | run: | 57 | del api.py 58 | del main.py 59 | del bilibili_util.py 60 | 61 | - name: Remove source code 62 | if: matrix.os != 'windows-latest' 63 | run: rm api.py main.py bilibili_util.py 64 | 65 | - name: Build Binary 66 | run: pyinstaller main.spec 67 | 68 | - name: Upload Artifacts 69 | uses: actions/upload-artifact@v4 70 | with: 71 | name: ${{ github.ref_name }}-${{ matrix.build }} 72 | path: dist/${{ github.ref_name }}-${{ matrix.build }} 73 | 74 | - name: Upload Release 75 | uses: softprops/action-gh-release@v2 76 | if: startsWith(github.ref, 'refs/tags/') 77 | with: 78 | files: dist/${{ github.ref_name }}-${{ matrix.build }} 79 | --------------------------------------------------------------------------------