Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Propose a workflow that doesn't fail on modern Java and Gradle #16

Merged
merged 1 commit into from
Sep 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
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 == 'release' }}"
run: ./gradlew publishPlugins
env:
ORG_GRADLE_PROJECT_pluginPortalApiKey: "${{ secrets.GRADLE_PLUGIN_API_KEY }}"
ORG_GRADLE_PROJECT_pluginPortalApiSecret: "${{ secrets.GRADLE_PLUGIN_API_SECRET }}"
43 changes: 0 additions & 43 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ https://github.com/ec4j/editorconfig-gradle-plugin/issues[report] them!

== Basic usage

`editorconfig-gradle-plugin` requires Java 7+ and Gradle 4.1+.
`editorconfig-gradle-plugin` requires Java 8+ and Gradle 4.1+.

To apply the plugin, add the following to your project:

Expand Down Expand Up @@ -115,7 +115,7 @@ duplicate work.

Prerequisites:

* Java 7+
* Java 8+

The most common build with unit tests:

Expand All @@ -140,7 +140,7 @@ On Windows:
git status

relVersion=...
sed -i "s/version = '[^']'/version = '${relVersion}'/" build.gradle
sed -i "s/version = '[^']'/version = '${relVersion}'/" build.gradle.kts
git add -A
git commit -m "Release ${relVersion}"
git tag ${relVersion}
Expand Down
26 changes: 0 additions & 26 deletions appveyor.yml

This file was deleted.

169 changes: 0 additions & 169 deletions build.gradle

This file was deleted.

Loading