dependabot.yml #37
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 workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle | |
name: Gradle CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
- id: check | |
name: Build with Gradle | |
uses: gradle/gradle-build-action@v3 | |
with: | |
arguments: check jacocoTestReport jacocoTestCoverageVerification coveralls | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
- id: install-gradle-properties | |
name: Install Gradle Properties from Secret | |
env: | |
GRADLE_PROPERTIES: ${{ secrets.GRADLE_PROPERTIES }} | |
shell: bash | |
run: | | |
mkdir -p ~/.gradle/ | |
echo "GRADLE_USER_HOME=${HOME}/.gradle" >> $GITHUB_ENV | |
echo "${GRADLE_PROPERTIES}" > ~/.gradle/gradle.properties | |
# create the ASCII armour: | |
# gpg -a --export-secret-keys <key_id> > keyfile.asc | |
# then store the content of <keyfile.asc> as github secret <OSSRH_GPG_SECRET_KEY> | |
- id: install-secret-key | |
name: Install GPG Key from Secret | |
run: | | |
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import | |
gpg --export-secret-keys -o /home/runner/.gnupg/secring.gpg | |
# The USERNAME and TOKEN need to correspond to the credentials environment variables used in | |
# the publishing section of your build.gradle | |
- name: Publish to SonaType and/or Github packages | |
uses: gradle/gradle-build-action@v3 | |
with: | |
arguments: publish | |
env: | |
USERNAME: ${{ github.actor }} | |
TOKEN: ${{ secrets.GITHUB_TOKEN }} |