diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml new file mode 100644 index 0000000..8019396 --- /dev/null +++ b/.github/workflows/blank.yml @@ -0,0 +1,33 @@ +name: Build and Release APK + +on: + push: + branches: + - main # 你可以更改分支名称 + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Set up JDK + uses: actions/setup-java@v2 + with: + distribution: 'adopt' + java-version: '11' + + - name: Build with Gradle + run: ./gradlew assembleRelease + + - name: Upload Release APK + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ github.event.repository.releases_url }} + asset_path: app/build/outputs/apk/release/app-release.apk + asset_name: app-release.apk + asset_content_type: application/vnd.android.package-archive + env: + GITHUB_TOKEN: ${{ secrets.apk }}