Skip to content

Commit

Permalink
Update actions in GitHub Actions workflows
Browse files Browse the repository at this point in the history
This PR updates the various actions used in the existing GitHub Actions workflows.
- `ubuntu-18.04` → `ubuntu-latest`
- `actions/checkout@v1` → `v4`
- `actions/checkout@v2` → `v4`
- `actions/setup-java@v1` → `v4`
- `eskatos/gradle-command-action@v1` → `gradle/actions/setup-gradle@v4`
- `actions/upload-artifact@v1` → `v4`
  • Loading branch information
MGaetan89 committed Sep 24, 2024
1 parent 9a30358 commit e214e92
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 32 deletions.
25 changes: 12 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
35 changes: 16 additions & 19 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit e214e92

Please sign in to comment.