-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* workflow yml file * workflow add * merge actions * CI CD Refactor * Actions needs defined * Publish tasks was deleted from build
- Loading branch information
Showing
1 changed file
with
39 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,49 @@ | ||
name: Java CI | ||
name: 'Gradle Actions' | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
|
||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Execute jacocoTestReport | ||
run: ./gradlew test jacocoTestReport && cp build/reports/jacoco/report.xml jacoco.xml || echo "Code coverage failed" | ||
- name: Build with Gradle | ||
run: ./gradlew build --refresh-dependencies --no-daemon --continue | ||
- name: Push codeCoverage to Codecov | ||
run: bash <(curl -s https://codecov.io/bash) | ||
|
||
release: | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Execute jacocoTestReport | ||
run: ./gradlew test jacocoTestReport && cp build/reports/jacoco/report.xml jacoco.xml || echo "Code coverage failed" | ||
- name: Build with Gradle | ||
run: ./gradlew build --refresh-dependencies --no-daemon --continue | ||
- name: Push codeCoverage to Codecov | ||
run: bash <(curl -s https://codecov.io/bash) | ||
- name: Publish plugin | ||
run: ./gradlew publishPlugins -Pgradle.publish.key=${{ secrets.KEY_GRADLE }} -Pgradle.publish.secret=${{ secrets.SECRET_GRADLE }} | ||
|
||
#release: | ||
# runs-on: ubuntu-latest | ||
#needs: build | ||
#steps: | ||
|
||
|
||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Execute jacocoTestReport | ||
run: ./gradlew test jacocoTestReport && cp build/reports/jacoco/report.xml jacoco.xml || echo "Code coverage failed" | ||
- name: Build with Gradle | ||
run: ./gradlew build --refresh-dependencies --no-daemon --continue | ||
- name: Push codeCoverage to Codecov | ||
run: bash <(curl -s https://codecov.io/bash) | ||
- name: Publish plugin | ||
run: ./gradlew publishPlugins -Pgradle.publish.key=${{ secrets.KEY_GRADLE }} -Pgradle.publish.secret=${{ secrets.SECRET_GRADLE }} |