|
| 1 | +name: Build and Release Debug |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags: |
| 6 | + - 'v*' |
| 7 | + workflow_dispatch: |
| 8 | + inputs: |
| 9 | + tag: |
| 10 | + description: 'Tag to create release for (e.g., v1.0.0)' |
| 11 | + required: true |
| 12 | + default: 'v1.0.0' |
| 13 | + |
| 14 | +jobs: |
| 15 | + build: |
| 16 | + runs-on: windows-latest |
| 17 | + steps: |
| 18 | + - name: Checkout code |
| 19 | + uses: actions/checkout@v3 |
| 20 | + |
| 21 | + - name: Set up Java |
| 22 | + uses: actions/setup-java@v3 |
| 23 | + with: |
| 24 | + distribution: 'zulu' |
| 25 | + java-version: '17' |
| 26 | + |
| 27 | + - name: Set up Flutter |
| 28 | + uses: subosito/flutter-action@v2 |
| 29 | + with: |
| 30 | + channel: 'stable' |
| 31 | + |
| 32 | + - name: Get dependencies |
| 33 | + run: flutter pub get |
| 34 | + |
| 35 | + - name: Build universal APK |
| 36 | + run: flutter build apk --debug |
| 37 | + |
| 38 | + - name: Build split APKs |
| 39 | + run: flutter build apk --split-per-abi --debug |
| 40 | + |
| 41 | + - name: Rename APKs |
| 42 | + run: | |
| 43 | + mkdir -p release |
| 44 | + copy build\app\outputs\flutter-apk\app-release.apk release\proxycloud-universal.apk |
| 45 | + copy build\app\outputs\flutter-apk\app-armeabi-v7a-release.apk release\proxycloud-armeabi-v7a.apk |
| 46 | + copy build\app\outputs\flutter-apk\app-arm64-v8a-release.apk release\proxycloud-arm64-v8a.apk |
| 47 | + copy build\app\outputs\flutter-apk\app-x86_64-release.apk release\proxycloud-x86_64.apk |
| 48 | + shell: cmd |
| 49 | + |
| 50 | + - name: Get tag name |
| 51 | + id: get_tag |
| 52 | + run: | |
| 53 | + if [[ $GITHUB_EVENT_NAME == 'workflow_dispatch' ]]; then |
| 54 | + echo "TAG_NAME=${{ github.event.inputs.tag }}" >> $GITHUB_ENV |
| 55 | + else |
| 56 | + echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV |
| 57 | + fi |
| 58 | + shell: bash |
| 59 | + |
| 60 | + - name: Create Release |
| 61 | + id: create_release |
| 62 | + uses: softprops/action-gh-release@v1 |
| 63 | + with: |
| 64 | + tag_name: ${{ env.TAG_NAME }} |
| 65 | + name: Release ${{ env.TAG_NAME }} |
| 66 | + draft: false |
| 67 | + prerelease: false |
| 68 | + files: | |
| 69 | + release/proxycloud-universal.apk |
| 70 | + release/proxycloud-armeabi-v7a.apk |
| 71 | + release/proxycloud-arm64-v8a.apk |
| 72 | + release/proxycloud-x86_64.apk |
| 73 | + body: | |
| 74 | + ## Installation |
| 75 | + |
| 76 | + ### Download |
| 77 | + |
| 78 | + | Architecture | Download Link | |
| 79 | + |-------------|---------------| |
| 80 | + | Universal | <a href="https://github.com/code3-dev/ProxyCloud/releases/download/${{ env.TAG_NAME }}/proxycloud-universal.apk"><img src="https://img.shields.io/badge/Android-Universal-3DDC84?style=for-the-badge&logo=android&logoColor=white" alt="Android Universal"></a> | |
| 81 | + | armeabi-v7a | <a href="https://github.com/code3-dev/ProxyCloud/releases/download/${{ env.TAG_NAME }}/proxycloud-armeabi-v7a.apk"><img src="https://img.shields.io/badge/Android-armeabi--v7a-3DDC84?style=for-the-badge&logo=android&logoColor=white" alt="Android armeabi-v7a"></a> | |
| 82 | + | arm64-v8a | <a href="https://github.com/code3-dev/ProxyCloud/releases/download/${{ env.TAG_NAME }}/proxycloud-arm64-v8a.apk"><img src="https://img.shields.io/badge/Android-arm64--v8a-3DDC84?style=for-the-badge&logo=android&logoColor=white" alt="Android arm64-v8a"></a> | |
| 83 | + | x86_64 | <a href="https://github.com/code3-dev/ProxyCloud/releases/download/${{ env.TAG_NAME }}/proxycloud-x86_64.apk"><img src="https://img.shields.io/badge/Android-x86_64-3DDC84?style=for-the-badge&logo=android&logoColor=white" alt="Android x86_64"></a> | |
0 commit comments