Skip to content

fix: editorconfig-linters dependency declaration scope #14

fix: editorconfig-linters dependency declaration scope

fix: editorconfig-linters dependency declaration scope #14

Workflow file for this run

name: "build"
on: ["pull_request", "push"]
jobs:
build:
# Only run on PRs if the source branch is on someone else's repo
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
runs-on: "ubuntu-latest"
steps:
- name: "checkout repository"
uses: "actions/checkout@v2.3.4"
- name: "validate gradle wrapper"
uses: "gradle/wrapper-validation-action@v1.0.4"
- name: "setup JDK 16"
uses: "actions/setup-java@v2.2.0"
with:
distribution: 'temurin'
java-version: "16"
- name: "build"
run: "./gradlew clean build -x test"
- name: "determine status"
run: |
if [ "$(./gradlew properties | awk '/^version:/ { print $2; }' | grep '\-SNAPSHOT')" ]; then
echo "STATUS=snapshot" >> $GITHUB_ENV
else
echo "STATUS=release" >> $GITHUB_ENV
fi
- name: "publish snapshot"
if: "${{ env.STATUS != 'release' && github.event_name == 'push' && github.ref == 'refs/heads/master' }}"
run: ./gradlew publishToSonatype
env:
ORG_GRADLE_PROJECT_sonatypeUsername: "${{ secrets.SONATYPE_USERNAME }}"
ORG_GRADLE_PROJECT_sonatypePassword: "${{ secrets.SONATYPE_PASSWORD }}"
- name: "publish release"
if: "${{ env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/master' }}"
run: ./gradlew publishPlugins
env:
ORG_GRADLE_PROJECT_pluginPortalApiKey: "${{ secrets.GRADLE_PLUGIN_API_KEY }}"
ORG_GRADLE_PROJECT_pluginPortalApiSecret: "${{ secrets.GRADLE_PLUGIN_API_SECRET }}"