Publishing settings

This commit is contained in:
Alexander Nozik 2021-03-07 15:05:36 +03:00
parent 6bdcd0f37d
commit bdef0d9185
4 changed files with 74 additions and 40 deletions

View File

@ -4,16 +4,33 @@ on: [ push ]
jobs: jobs:
build: build:
strategy:
runs-on: ubuntu-latest matrix:
os: [ macOS-latest, windows-latest ]
runs-on: ${{matrix.os}}
steps: steps:
- uses: actions/checkout@v2 - name: Checkout the repo
uses: actions/checkout@v2
- name: Set up JDK 11 - name: Set up JDK 11
uses: actions/setup-java@v1 uses: actions/setup-java@v1
with: with:
java-version: 11 java-version: 11
- name: Grant execute permission for gradlew - name: Add msys to path
run: chmod +x gradlew if: matrix.os == 'windows-latest'
- name: Build with Gradle run: SETX PATH "%PATH%;C:\msys64\mingw64\bin"
run: ./gradlew build - name: Cache gradle
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Cache konan
uses: actions/cache@v2
with:
path: ~/.konan
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build
run: ./gradlew build --no-daemon --stacktrace

View File

@ -1,40 +1,57 @@
name: Bintray Publish name: Gradle publish
on: on:
workflow_dispatch:
release: release:
types: types:
- created - created
jobs: jobs:
build-on-windows: publish:
runs-on: windows-latest environment:
name: publish
strategy:
matrix:
os: [macOS-latest, windows-latest]
runs-on: ${{matrix.os}}
steps: steps:
- uses: actions/checkout@v2 - name: Checkout the repo
uses: actions/checkout@v2
- name: Set up JDK 11 - name: Set up JDK 11
uses: actions/setup-java@v1 uses: actions/setup-java@v1
with: with:
java-version: 11 java-version: 11
- name: Grant execute permission for gradlew - name: Add msys to path
run: chmod +x gradlew if: matrix.os == 'windows-latest'
- name: Gradle clean run: SETX PATH "%PATH%;C:\msys64\mingw64\bin"
run: ./gradlew clean - name: Cache gradle
- name: Gradle build uses: actions/cache@v2
run: ./gradlew build
- name: Run release task
run: ./gradlew release -PbintrayUser=${{ secrets.BINTRAY_USER }} -PbintrayApiKey=${{ secrets.BINTRAY_KEY }}
build-on-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with: with:
java-version: 11 path: ~/.gradle/caches
- name: Grant execute permission for gradlew key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }}
run: chmod +x gradlew restore-keys: |
- name: Gradle clean ${{ runner.os }}-gradle-
run: ./gradlew clean - name: Cache konan
- name: Gradle build uses: actions/cache@v2
run: ./gradlew build with:
- name: Run release task path: ~/.konan
run: ./gradlew release -PbintrayUser=${{ secrets.BINTRAY_USER }} -PbintrayApiKey=${{ secrets.BINTRAY_KEY }} key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Publish Windows Artifacts
if: matrix.os == 'windows-latest'
run: >
./gradlew release --no-daemon
-Ppublishing.github.user=${{ secrets.PUBLISHING_GITHUB_USER }}
-Ppublishing.github.token=${{ secrets.PUBLISHING_GITHUB_TOKEN }}
-Ppublishing.space.user=${{ secrets.PUBLISHING_SPACE_USER }}
-Ppublishing.space.token=${{ secrets.PUBLISHING_SPACE_TOKEN }}
- name: Publish Mac Artifacts
if: matrix.os == 'macOS-latest'
run: >
./gradlew release --no-daemon
-Ppublication.platform=macosX64
-Ppublishing.github.user=${{ secrets.PUBLISHING_GITHUB_USER }}
-Ppublishing.github.token=${{ secrets.PUBLISHING_GITHUB_TOKEN }}
-Ppublishing.space.user=${{ secrets.PUBLISHING_SPACE_USER }}
-Ppublishing.space.token=${{ secrets.PUBLISHING_SPACE_TOKEN }}

View File

@ -8,7 +8,7 @@ allprojects {
} }
subprojects { subprojects {
apply(plugin = "ru.mipt.npm.gradle.publish") apply(plugin = "maven-publish")
repositories { repositories {
maven("https://dl.bintray.com/mipt-npm/kscience") maven("https://dl.bintray.com/mipt-npm/kscience")
maven("https://dl.bintray.com/mipt-npm/dev") maven("https://dl.bintray.com/mipt-npm/dev")
@ -20,9 +20,9 @@ readme {
} }
ksciencePublish { ksciencePublish {
bintrayRepo = "dataforge" github("dataforge-core")
githubProject = "dataforge-core" space("https://maven.pkg.jetbrains.space/mipt-npm/p/sci/maven")
spaceRepo = "https://maven.pkg.jetbrains.space/mipt-npm/p/sci/maven" sonatype()
} }
apiValidation { apiValidation {

View File

@ -6,7 +6,7 @@ pluginManagement {
maven("https://dl.bintray.com/kotlin/kotlin-eap") maven("https://dl.bintray.com/kotlin/kotlin-eap")
} }
val toolsVersion = "0.8.4" val toolsVersion = "0.9.0"
val kotlinVersion = "1.4.31" val kotlinVersion = "1.4.31"
plugins { plugins {