Skip to content

Commit

Permalink
Update pipeline configuration.
Browse files Browse the repository at this point in the history
Signed-off-by: Łukasz Dywicki <luke@code-house.org>
  • Loading branch information
splatch committed Apr 8, 2024
1 parent dd7e2ee commit 6878e5b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jobs:
distribution: 'temurin'
java-version: '21'
cache: gradle
server-id: 'https://oss.sonatype.org'
server-username: CI_DEPLOY_USERNAME
server-password: CI_DEPLOY_PASSWORD

- uses: kiancross/checkstyle-annotations-action@v1

Expand All @@ -34,7 +37,6 @@ jobs:
- name: Validate EdgeApp.bndrun
run: git diff --exit-code io.openems.edge.application/EdgeApp.bndrun

#
# Generate Code-coverage-report
#
- name: Generate JaCoCo Code-coverage-report
Expand Down Expand Up @@ -65,6 +67,14 @@ jobs:
mkdir -p ./jacoco
echo $PR_NUMBER > ./jacoco/jacoco_report_number
echo '![Code Coverage]'"(https://img.shields.io/badge/Code%20Coverage-${coverage}%25-${color}?style=flat)" > ./jacoco/jacoco_report_badge
- name: Deploy Edge+Backend assets
if: success() && github.event_name == 'push' && github.ref_name == 'develop'
run: ./gradlew buildEdge buildBackend -DmavenPublishRepository=RemoteMavenRepository
env:
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }}

- uses: actions/upload-artifact@v4
with:
name: jacoco_report
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ jobs:
distribution: 'temurin'
java-version: '21'
cache: gradle
server-id: 'https://oss.sonatype.org'
server-username: CI_RELEASE_USERNAME
server-password: CI_RELEASE_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}

- uses: kiancross/checkstyle-annotations-action@v1

Expand All @@ -32,8 +36,12 @@ jobs:
- name: Validate EdgeApp.bndrun
run: git diff --exit-code io.openems.edge.application/EdgeApp.bndrun

- name: Prepare Edge+Backend assets
run: ./gradlew buildEdge buildBackend
- name: Prepare and deploy Edge+Backend assets
run: ./gradlew buildEdge buildBackend -DmavenPublishRepository=RemoteMavenRepository -Drelease=true
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
CI_RELEASE_USERNAME: ${{ secrets.CI_RELEASE_USERNAME }}
CI_RELEASE_PASSWORD: ${{ secrets.CI_RELEASE_PASSWORD }}

- name: Save build-artifacts
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit 6878e5b

Please sign in to comment.