fix: editorconfig-linters dependency declaration scope #14
Workflow file for this run
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" | |
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/[email protected]" | |
- name: "validate gradle wrapper" | |
uses: "gradle/[email protected]" | |
- name: "setup JDK 16" | |
uses: "actions/[email protected]" | |
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 }}" |