Skip to content

Commit

Permalink
Merge pull request #37 from ChristopheCVB/develop
Browse files Browse the repository at this point in the history
core: CI & CD rework
  • Loading branch information
ChristopheCVB authored Jul 24, 2021
2 parents 7005921 + ee4ec7d commit 65e2f40
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 53 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/snapshot.yml → .github/workflows/develop.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,29 @@
name: Publish Snapshot
name: Build and Publish Snapshot

on:
push:
branches:
- develop
branches: [ develop ]

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
java-package: jdk
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build

publish-snapshot:

needs: build
runs-on: ubuntu-latest

steps:
Expand Down
62 changes: 45 additions & 17 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Coverage
name: Build, Coverage and Publish Release

on:
push:
Expand All @@ -10,19 +10,47 @@ jobs:
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
java-package: jdk
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: JaCoco Test Report
run: ./gradlew jacocoTestReport
- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./Library/build/reports/jacoco/test/jacocoTestReport.xml
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
java-package: jdk
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: JaCoco Test Report
run: ./gradlew jacocoTestReport
- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./Library/build/reports/jacoco/test/jacocoTestReport.xml

publish-release:

needs: build-and-coverage
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Gradle Maven Publish
run: |
./gradlew publishMavenJavaPublicationToMavenRepository
env:
IS_RELEASE: "YES"
PGP_KEY: ${{ secrets.PGP_KEY }}
PGP_PWD: ${{ secrets.PGP_PWD }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
- name: Gradle Plugin Publish
run: |
./gradlew publishPlugins -Pgradle.publish.key=$GRADLE_PUBLISH_KEY -Pgradle.publish.secret=$GRADLE_PUBLISH_SECRET
env:
IS_RELEASE: "YES"
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
32 changes: 0 additions & 32 deletions .github/workflows/release.yml

This file was deleted.

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

[![Touch Portal Plugin SDK](https://raw.githubusercontent.com/ChristopheCVB/TouchPortalPluginSDK/master/resources/TP%20Plugin%20SDK%20Logo.png)](#touch-portal-plugin-sdk)

[![Build and Coverage](https://github.com/ChristopheCVB/TouchPortalPluginSDK/workflows/Build%20and%20Coverage/badge.svg)](#touch-portal-plugin-sdk)
[![Build, Coverage and Publish Release](https://github.com/ChristopheCVB/TouchPortalPluginSDK/workflows/Build,%20Coverage%20and%20Publish%20Release/badge.svg)](#touch-portal-plugin-sdk)
[![Build and Publish Snapshot](https://github.com/ChristopheCVB/TouchPortalPluginSDK/workflows/Build%20and%20Publish%20Snapshot/badge.svg)](#touch-portal-plugin-sdk)
[![Code Coverage](https://codecov.io/gh/ChristopheCVB/TouchPortalPluginSDK/branch/master/graph/badge.svg)](https://codecov.io/gh/ChristopheCVB/TouchPortalPluginSDK)
[![Language gradle: Java](https://img.shields.io/lgtm/grade/java/g/ChristopheCVB/TouchPortalPluginSDK.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/ChristopheCVB/TouchPortalPluginSDK/context:java)

Expand Down

0 comments on commit 65e2f40

Please sign in to comment.