diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2558eb68..85afba64 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,6 +5,8 @@ on: branches-ignore: - '' push: + tags: + - 'v*' branches-ignore: - '' workflow_dispatch: @@ -29,14 +31,23 @@ jobs: with: java-version: 17 - - name: Build debug ${{matrix.arch}} .apk + - name: Build ${{matrix.arch}} .apk run: | chmod +x gradlew - ./gradlew assembleautobuild -Darch=${{matrix.arch}} + ./gradlew assemblerelease -Darch=${{matrix.arch}} + + - name: Release + if: startsWith(github.ref, 'refs/tags/') + uses: softprops/action-gh-release@v1 + with: + token: "${{ secrets.TOKEN }}" + files: | + FCL/build/outputs/apk/release/*.apk - name: upload apk + if: startsWith(github.ref, 'refs/heads/') uses: actions/upload-artifact@v3 with: - name: app-debug-${{matrix.arch}} - path: FCL/build/outputs/apk/autobuild/* + name: app-${{matrix.arch}} + path: FCL/build/outputs/apk/release/* # retention-days: 1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 79b208f7..00000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Release new version - -on: - push: - tags: - - 'v*' - branches-ignore: - - '' - workflow_dispatch: - -jobs: - build: - strategy: - matrix: - arch: [ "all", "arm", "arm64", "x86", "x64" ] - fail-fast: false - env: - FCL_KEYSTORE_PASSWORD: ${{ secrets.FCL_KEYSTORE_PASSWORD }} - name: Build for ${{matrix.arch}} - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: set up JDK 17 - uses: actions/setup-java@v1 - with: - java-version: 17 - - - name: Build release ${{matrix.arch}} .apk - run: | - chmod +x gradlew - ./gradlew assemblerelease -Darch=${{matrix.arch}} - - - name: Release - uses: marvinpinto/action-automatic-releases@latest - with: - repo_token: "${{ secrets.TOKEN }}" - prerelease: false - files: | - FCL/build/outputs/apk/release/*.apk \ No newline at end of file diff --git a/FCL/build.gradle b/FCL/build.gradle index 6d06cbc4..04984f79 100644 --- a/FCL/build.gradle +++ b/FCL/build.gradle @@ -38,10 +38,6 @@ android { proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' signingConfig signingConfigs.FCLKey } - autobuild { - initWith debug - signingConfig signingConfigs.FCLKey - } configureEach { resValue "string", "app_version", "${defaultConfig.versionName}" }