diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 28eb321c..5f350cb5 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -10,16 +10,15 @@ on: - develop jobs: - build: + build_and_test: name: Build and Test runs-on: ubuntu-latest - steps: - name: Checkout code - uses: actions/checkout@v4.2.2 + uses: actions/checkout@v4 - name: Setup Java JDK - uses: actions/setup-java@v4.5.0 + uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: '17' @@ -41,7 +40,7 @@ jobs: sudo udevadm trigger --name-match=kvm - name: Run connected tests - uses: ReactiveCircus/android-emulator-runner@v2.33.0 + uses: ReactiveCircus/android-emulator-runner@v2 with: api-level: 26 script: | @@ -49,6 +48,6 @@ jobs: ./gradlew connectedCheck --no-parallel - name: Coveralls GitHub Action - uses: coverallsapp/github-action@v2.3.4 + uses: coverallsapp/github-action@v2 with: format: jacoco diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 396a0471..bddb3fde 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -16,12 +16,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v4.2.2 + uses: actions/checkout@v4 with: ref: ${{ github.event.inputs.branch }} - name: Setup Java JDK - uses: actions/setup-java@v4.5.0 + uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: '17' @@ -35,8 +35,15 @@ jobs: - name: Rename output APK run: | - DATE=$(date +'%Y%m%d%H%M') + DATE=$(date +'%Y%m%d-%H%M') mv app/build/outputs/apk/debug/app-debug.apk app/build/outputs/apk/debug/OSMTracker-nightly-$DATE.apk + echo "ARTIFACT_DATE=$DATE" >> $GITHUB_ENV + + - name: Upload a Build Artifact + uses: actions/upload-artifact@v4 + with: + name: nightly-${{ env.ARTIFACT_DATE }} + path: app/build/outputs/apk/debug/OSMTracker-nightly-*.apk - name: Delete existing Nightly release run: gh release delete nightly --cleanup-tag --yes @@ -44,7 +51,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Create GitHub Nightly Release - uses: softprops/action-gh-release@v2.1.0 + uses: softprops/action-gh-release@v2 with: tag_name: 'nightly' name: 'Nightly Build'