Merge pull request #42 from langerhans/lh/release-variant-fix #60
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build OdinTools | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
permissions: | |
pull-requests: write | |
jobs: | |
ktlint: | |
uses: ./.github/workflows/ktlint.yml | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
needs: | |
- ktlint | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Setup JDK | |
uses: actions/[email protected] | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
with: | |
add-job-summary-as-pr-comment: always | |
build-scan-publish: true | |
build-scan-terms-of-use-url: "https://gradle.com/help/legal-terms-of-use" | |
build-scan-terms-of-use-agree: "yes" | |
- name: Build app | |
run: ./gradlew assemble | |
- name: Save debug apk | |
uses: actions/upload-artifact@v4 | |
with: | |
name: debug apk | |
path: app/build/outputs/apk/debug/OdinTools-*.apk | |
if-no-files-found: error | |
- name: Save (unsigned) release apk | |
uses: actions/upload-artifact@v4 | |
with: | |
name: unsigned release apk | |
path: app/build/outputs/apk/release/OdinTools-*.apk | |
if-no-files-found: error | |
dependencies: | |
name: Dependency graph | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Setup JDK | |
uses: actions/[email protected] | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Generate and submit dependency graph | |
uses: gradle/actions/dependency-submission@v3 |