mirror of
https://github.com/kiwix/java-libkiwix.git
synced 2025-09-09 15:19:32 -04:00
Merge pull request #58 from kiwix/workflow-fixes
Refresh a bit the CI/CD workflows
This commit is contained in:
commit
f48a43a398
@ -1,4 +1,4 @@
|
|||||||
name: Pull requests
|
name: CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
@ -7,38 +7,35 @@ on:
|
|||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
Build:
|
||||||
build_job:
|
name: Build & test source code
|
||||||
name: Build Pull Request
|
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- name: Checkout code
|
||||||
with:
|
uses: actions/checkout@v3
|
||||||
fetch-depth: 1
|
|
||||||
|
|
||||||
- name: Set up JDK 11
|
- name: Set up JDK 11
|
||||||
uses: actions/setup-java@v1
|
uses: actions/setup-java@v2
|
||||||
with:
|
with:
|
||||||
|
distribution: adopt
|
||||||
java-version: 11
|
java-version: 11
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: bash ./install_deps.sh
|
run: bash ./install_deps.sh
|
||||||
|
|
||||||
- name: Compile Project
|
- name: Compile Project
|
||||||
run: |
|
run: ./gradlew buildHeaders build
|
||||||
./gradlew buildHeaders build
|
|
||||||
|
|
||||||
- name: create unit coverage
|
- name: Create code coverage report
|
||||||
run: |
|
run: ./gradlew createCodeCoverageReport
|
||||||
./gradlew createCodeCoverageReport
|
|
||||||
|
|
||||||
- name: Upload coverage to Codecov
|
- name: Upload code coverage to Codecov
|
||||||
uses: codecov/codecov-action@v2
|
uses: codecov/codecov-action@v3
|
||||||
|
|
||||||
- name: Upload Coverage to GH-Actions
|
- name: Upload Coverage to GH-Actions
|
||||||
uses: actions/upload-artifact@v2.2.0
|
uses: actions/upload-artifact@v2.2.0
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
with:
|
with:
|
||||||
name: Tests Coverage Report
|
name: Tests Coverage Report
|
||||||
path: |
|
path: |
|
@ -1,23 +1,16 @@
|
|||||||
name: Build Java-LibKiwix
|
name: Publish to Maven Central
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
release:
|
||||||
branches-ignore:
|
types: [published]
|
||||||
- '*'
|
|
||||||
- '*/**'
|
|
||||||
tags:
|
|
||||||
- '*'
|
|
||||||
- '*/**'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
|
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout code
|
||||||
with:
|
uses: actions/checkout@v3
|
||||||
fetch-depth: 1
|
|
||||||
|
|
||||||
- name: Set up JDK 11
|
- name: Set up JDK 11
|
||||||
uses: actions/setup-java@v2
|
uses: actions/setup-java@v2
|
||||||
@ -28,20 +21,12 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: bash ./install_deps.sh
|
run: bash ./install_deps.sh
|
||||||
|
|
||||||
- name: Compile Project
|
- name: Compile and prepare package
|
||||||
run: |
|
run: ./gradlew buildHeaders build assemble androidSourcesJar
|
||||||
./gradlew buildHeaders build
|
|
||||||
|
|
||||||
- name: Release build
|
- name: Publish
|
||||||
run: |
|
|
||||||
./gradlew assemble
|
|
||||||
|
|
||||||
- name: Generate Source jar
|
|
||||||
run: |
|
|
||||||
./gradlew androidSourcesJar
|
|
||||||
|
|
||||||
- name: Publish to MavenCentral
|
|
||||||
run: ./gradlew publishReleasePublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository
|
run: ./gradlew publishReleasePublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository
|
||||||
|
if: github.event_name == 'release'
|
||||||
env:
|
env:
|
||||||
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
|
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
|
||||||
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
|
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
|
Loading…
x
Reference in New Issue
Block a user