diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 32de4753..8eabc8d6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,34 +15,33 @@ jobs: name: Build and release runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: token: "${{ secrets.GITHUB_TOKEN }}" fetch-depth: 0 - - name: set up JDK 17 - uses: actions/setup-java@v1 + - name: Set up JDK 17 + uses: actions/setup-java@v4 with: java-version: 17 + distribution: 'temurin' - name: Get latest version run: | echo $(git describe --tags --abbrev=0) echo "VERSION=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 - name: Build bundle - uses: eskatos/gradle-command-action@v1 - with: - arguments: ':app:bundlePurefossDebug' - - name: Build apk - uses: eskatos/gradle-command-action@v1 - with: - arguments: ':app:assemblePurefossDebug' - - name: Upload apk and bundle - uses: actions/upload-artifact@v1 + run: ./gradlew :app:bundlePurefossDebug + - name: Build APK + run: ./gradlew :app:assemblePurefossDebug + - name: Upload APK and bundle + uses: actions/upload-artifact@v4 with: name: app path: app/build/outputs/ - name: Create release if: startsWith(github.ref, 'refs/tags/') - uses: "marvinpinto/action-automatic-releases@latest" + uses: marvinpinto/action-automatic-releases@latest with: repo_token: "${{ secrets.GITHUB_TOKEN }}" prerelease: false diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index e07007fa..247083f6 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -11,23 +11,20 @@ on: jobs: test: name: Run Unit Tests - runs-on: ubuntu-18.04 - + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - name: set up JDK 17 - uses: actions/setup-java@v1 - with: - java-version: 17 - - name: Unit tests - run: bash ./gradlew testPurefossDebug -PdisablePreDex --no-daemon - - name: Archive test results - uses: actions/upload-artifact@v1 - with: - name: test-results - path: app/build/test-results/testPurefossDebugUnitTest/ - - name: Archive test reports - uses: actions/upload-artifact@v1 - with: - name: test-reports - path: app/build/reports/tests + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: 17 + distribution: 'temurin' + - name: Unit tests + run: ./gradlew testPurefossDebug -PdisablePreDex --no-daemon + - name: Archive test results + uses: actions/upload-artifact@v4 + with: + name: test-results + path: | + app/build/test-results/testPurefossDebugUnitTest/ + app/build/reports/tests