New publication configuration (#14)
* add Dokka + align POM metadatas with sonatype requirements * update snapshot CI * update JNI publication * update CI scripts * remove maven-metadata-local.xml * add snapshot publication with maven-publish plugin
This commit is contained in:
32
.github/workflows/release.yml
vendored
32
.github/workflows/release.yml
vendored
@@ -89,24 +89,38 @@ jobs:
|
||||
BINTRAY_USER: ${{ secrets.bintray_user }}
|
||||
BINTRAY_APIKEY: ${{ secrets.bintray_apikey }}
|
||||
shell: bash
|
||||
run: ./gradlew publishLinuxPublicationToBintrayRepository :jni:jvm:linux:publishJvmPublicationToBintrayRepository
|
||||
# ./gradlew publishLinuxPublicationToBintrayRepository :jni:jvm:linux:publishJvmPublicationToBintrayRepository
|
||||
run: ./gradlew publishLinuxPublicationToMavenLocal :jni:jvm:linux:publishJvmPublicationToMavenLocal
|
||||
- name: Publish Windows
|
||||
if: matrix.os == 'windows-latest'
|
||||
env:
|
||||
BINTRAY_USER: ${{ secrets.bintray_user }}
|
||||
BINTRAY_APIKEY: ${{ secrets.bintray_apikey }}
|
||||
shell: bash
|
||||
run: ./gradlew :jni:jvm:mingw:publishJvmPublicationToBintrayRepository
|
||||
# ./gradlew :jni:jvm:mingw:publishJvmPublicationToBintrayRepository
|
||||
run: ./gradlew :jni:jvm:mingw:publishToMavenLocal
|
||||
- name: Publish MacOS
|
||||
if: matrix.os == 'macOS-latest'
|
||||
env:
|
||||
BINTRAY_USER: ${{ secrets.bintray_user }}
|
||||
BINTRAY_APIKEY: ${{ secrets.bintray_apikey }}
|
||||
shell: bash
|
||||
run: ./gradlew publish
|
||||
- name: Discard
|
||||
if: ${{ failure() || cancelled() }}
|
||||
env:
|
||||
BINTRAY_USER: ${{ secrets.bintray_user }}
|
||||
BINTRAY_APIKEY: ${{ secrets.bintray_apikey }}
|
||||
run: ./gradlew postBintrayDiscard
|
||||
# ./gradlew publish
|
||||
run: ./gradlew publishToMavenLocal
|
||||
- name: Copy artifact files
|
||||
run: |
|
||||
mkdir -p maven-local/release
|
||||
cp -r ~/.m2/repository/* maven-local/release
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: release
|
||||
path: |
|
||||
maven-local
|
||||
!maven-local/**/maven-metadata-local.xml
|
||||
# - name: Discard
|
||||
# if: ${{ failure() || cancelled() }}
|
||||
# env:
|
||||
# BINTRAY_USER: ${{ secrets.bintray_user }}
|
||||
# BINTRAY_APIKEY: ${{ secrets.bintray_apikey }}
|
||||
# run: ./gradlew postBintrayDiscard
|
||||
|
||||
83
.github/workflows/snapshot.yml
vendored
83
.github/workflows/snapshot.yml
vendored
@@ -3,7 +3,7 @@ name: Publish snapshot
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'snapshot/*'
|
||||
- 'master'
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- '**.adoc'
|
||||
@@ -97,49 +97,64 @@ jobs:
|
||||
BINTRAY_USER: ${{ secrets.bintray_user }}
|
||||
BINTRAY_APIKEY: ${{ secrets.bintray_apikey }}
|
||||
shell: bash
|
||||
run: ./gradlew publishLinuxPublicationToBintrayRepository :jni:jvm:linux:publishJvmPublicationToBintrayRepository -PsnapshotNumber=${{ github.run_number }} -PgitRef=${{ github.ref }}
|
||||
# ./gradlew publishLinuxPublicationToBintrayRepository :jni:jvm:linux:publishJvmPublicationToBintrayRepository -PsnapshotNumber=${{ github.run_number }} -PgitRef=${{ github.ref }}
|
||||
run: ./gradlew publishLinuxPublicationToMavenLocal :jni:jvm:linux:publishJvmPublicationToMavenLocal -PsnapshotNumber=${{ github.run_number }} -PgitRef=${{ github.ref }}
|
||||
- name: Publish Windows
|
||||
if: matrix.os == 'windows-latest'
|
||||
env:
|
||||
BINTRAY_USER: ${{ secrets.bintray_user }}
|
||||
BINTRAY_APIKEY: ${{ secrets.bintray_apikey }}
|
||||
shell: bash
|
||||
run: ./gradlew :jni:jvm:mingw:publishJvmPublicationToBintrayRepository -PsnapshotNumber=${{ github.run_number }} -PgitRef=${{ github.ref }}
|
||||
# ./gradlew :jni:jvm:mingw:publishJvmPublicationToBintrayRepository -PsnapshotNumber=${{ github.run_number }} -PgitRef=${{ github.ref }}
|
||||
run: ./gradlew :jni:jvm:mingw:publishToMavenLocal -PsnapshotNumber=${{ github.run_number }} -PgitRef=${{ github.ref }}
|
||||
- name: Publish MacOS
|
||||
if: matrix.os == 'macOS-latest'
|
||||
env:
|
||||
BINTRAY_USER: ${{ secrets.bintray_user }}
|
||||
BINTRAY_APIKEY: ${{ secrets.bintray_apikey }}
|
||||
shell: bash
|
||||
run: ./gradlew publish -PsnapshotNumber=${{ github.run_number }} -PgitRef=${{ github.ref }}
|
||||
- name: Discard
|
||||
if: ${{ failure() || cancelled() }}
|
||||
env:
|
||||
BINTRAY_USER: ${{ secrets.bintray_user }}
|
||||
BINTRAY_APIKEY: ${{ secrets.bintray_apikey }}
|
||||
run: ./gradlew postBintrayDiscard -PsnapshotNumber=${{ github.run_number }} -PgitRef=${{ github.ref }}
|
||||
# ./gradlew publish -PsnapshotNumber=${{ github.run_number }} -PgitRef=${{ github.ref }}
|
||||
run: ./gradlew publishToMavenLocal -PsnapshotNumber=${{ github.run_number }} -PgitRef=${{ github.ref }}
|
||||
- name: Copy artifact files
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p maven-local/snapshot
|
||||
cp -r ~/.m2/repository/* maven-local/snapshot
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: snapshot
|
||||
path: |
|
||||
maven-local
|
||||
!maven-local/**/maven-metadata-local.xml
|
||||
# - name: Discard
|
||||
# if: ${{ failure() || cancelled() }}
|
||||
# env:
|
||||
# BINTRAY_USER: ${{ secrets.bintray_user }}
|
||||
# BINTRAY_APIKEY: ${{ secrets.bintray_apikey }}
|
||||
# run: ./gradlew postBintrayDiscard -PsnapshotNumber=${{ github.run_number }} -PgitRef=${{ github.ref }}
|
||||
|
||||
publish:
|
||||
name: Publish
|
||||
needs: upload
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: 'true'
|
||||
- name: Cached Gradle
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.gradle
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
|
||||
restore-keys: ${{ runner.os }}-gradle-
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
- name: Publish
|
||||
env:
|
||||
BINTRAY_USER: ${{ secrets.bintray_user }}
|
||||
BINTRAY_APIKEY: ${{ secrets.bintray_apikey }}
|
||||
run: ./gradlew postBintrayPublish -PsnapshotNumber=${{ github.run_number }} -PgitRef=${{ github.ref }}
|
||||
# publish:
|
||||
# name: Publish
|
||||
# needs: upload
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - name: Check out
|
||||
# uses: actions/checkout@v2
|
||||
# with:
|
||||
# submodules: 'true'
|
||||
# - name: Cached Gradle
|
||||
# uses: actions/cache@v2
|
||||
# with:
|
||||
# path: ~/.gradle
|
||||
# key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
|
||||
# restore-keys: ${{ runner.os }}-gradle-
|
||||
# - name: Set up JDK 11
|
||||
# uses: actions/setup-java@v1
|
||||
# with:
|
||||
# java-version: 11
|
||||
# - name: Publish
|
||||
# env:
|
||||
# BINTRAY_USER: ${{ secrets.bintray_user }}
|
||||
# BINTRAY_APIKEY: ${{ secrets.bintray_apikey }}
|
||||
# run: ./gradlew postBintrayPublish -PsnapshotNumber=${{ github.run_number }} -PgitRef=${{ github.ref }}
|
||||
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@@ -10,7 +10,7 @@ on:
|
||||
- '!.github/workflows/test.yml'
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
- '!master'
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- '**.adoc'
|
||||
|
||||
Reference in New Issue
Block a user