-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
145 additions
and
97 deletions.
There are no files selected for viewing
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
name: Gradle Build, Tests and Publish | ||
|
||
# Runs on Pull Requests and on the `main` branch after the `changeset` workflow ran (see `publish` job) | ||
on: | ||
workflow_run: | ||
workflows: | ||
- Changeset | ||
types: | ||
- completed | ||
pull_request: | ||
|
||
jobs: | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
|
||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v4 | ||
|
||
- name: Adding Google Services | ||
env: | ||
DATA: ${{ secrets.GOOGLE_SERVICES }} | ||
run: echo $DATA | base64 -di > ./example/google-services.json | ||
|
||
- name: Build with Gradle Wrapper | ||
run: echo "FAKE -- BUILD" | ||
# run: ./gradlew build -xlint | ||
|
||
|
||
test: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
checks: write | ||
pull-requests: write | ||
needs: build | ||
steps: | ||
- name: Test with Gradle Wrapper | ||
run: echo "FAKE -- TEST" | ||
# run: ./gradlew test | ||
|
||
# - name: Publish Test Report | ||
# uses: mikepenz/action-junit-report@v4 | ||
# if: success() || failure() # always run even if the previous step fails | ||
# with: | ||
# report_paths: '**/build/test-results/test*/TEST-*.xml' | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
checks: write | ||
pull-requests: write | ||
needs: build | ||
steps: | ||
- name: Lint with Gradle Wrapper | ||
run: echo "FAKE -- LINT" | ||
# run: ./gradlew lint | ||
# - name: Publish Lint Report | ||
# uses: yutailang0119/action-android-lint@v4 | ||
# if: success() || failure() # always run even if the previous step fails | ||
# with: | ||
# report-path: '**/build/reports/lint-results-*.xml' | ||
# ignore-warnings: false | ||
# continue-on-error: false # If annotations contain error of severity, action-android-lint exit 1. | ||
|
||
|
||
|
||
publish: | ||
runs-on: ubuntu-latest | ||
needs: [ build, test, lint ] | ||
steps: | ||
- name: Publish to Maven | ||
run: echo "FAKE - PUBLISH" | ||
|
||
dependency-submission: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
|
||
needs: publish # only submit dependencies for published releases | ||
|
||
steps: | ||
# Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies. | ||
# See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md | ||
- name: Generate and submit dependency graph | ||
run: echo "FAKE - DEPENDENCY SUBMISSION" | ||
# uses: gradle/actions/dependency-submission@v4 | ||
# with: | ||
# cache-read-only: true |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env bash | ||
|
||
# make sure the script runs relative to the repo root | ||
set -euo pipefail && cd "$(dirname "${BASH_SOURCE[0]}")/.." | ||
|
||
info() { printf "%s\n" "$*" >&1; } | ||
error() { printf "%s\n" "$*" >&2; } | ||
trap 'echo Changeset interrupted >&2; exit 2' INT TERM | ||
|
||
|
||
info "Publishing via gradle publish task" | ||
ORG_GRADLE_PROJECT_NEXUS_USERNAME="lol-yo" ./gradlew publish \ | ||
-Psigning.secretKeyRingFile="../publish-mvn.asc \ | ||
-Psigning.keyId="4AE5701C" \ | ||
-Psigning.password="A/4DBzp2wAbmnSEip+Erb8Hx3oJckCYdbKxQgsvKE4MZa/iI6usCg2404wcOxPNC" | ||
# NEXUS_USERNAME=josuemontano | ||
# NEXUS_PASSWORD=h5,K/9GC&gQZ;?>C=^:4 | ||
# 403DC5174AE5701C | ||
# signing.keyId=4AE5701C | ||
# signing.password=A/4DBzp2wAbmnSEip+Erb8Hx3oJckCYdbKxQgsvKE4MZa/iI6usCg2404wcOxPNC | ||
# signing.secretKeyRingFile=/Users/ullrich/Projects/magicbell-android/foobar.gpg |