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