Another attempt at publishing snapshot via github actions
This commit is contained in:
parent
b22a840dbe
commit
c9e1bb0965
17
.github/workflows/develop.yml
vendored
17
.github/workflows/develop.yml
vendored
@ -7,9 +7,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: set up JDK 1.8
|
- name: set up JDK 1.8
|
||||||
@ -18,3 +16,18 @@ jobs:
|
|||||||
java-version: 1.8
|
java-version: 1.8
|
||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
run: ./gradlew build
|
run: ./gradlew build
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
needs: build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- name: set up JDK 1.8
|
||||||
|
uses: actions/setup-java@v1
|
||||||
|
with:
|
||||||
|
java-version: 1.8
|
||||||
|
- name: deploy snapshot
|
||||||
|
env:
|
||||||
|
NEXUS_USERNAME: {{ secrets.NEXUS_USERNAME }}
|
||||||
|
NEXUS_PASSWORD: {{ secrets.NEXUS_PASSWORD }}
|
||||||
|
run: ./gradlew upA -Prelease -PCI
|
||||||
|
@ -99,6 +99,14 @@ task checkUpdates {
|
|||||||
def registerArtifact(project) {
|
def registerArtifact(project) {
|
||||||
|
|
||||||
if (hasProperty('release')) {
|
if (hasProperty('release')) {
|
||||||
|
|
||||||
|
// to be used in github actions (to publish a snapshot)
|
||||||
|
// but only if we have snapshot in the version name
|
||||||
|
if (hasProperty('CI') && VERSION_NAME.contains('SNAPSHOT')) {
|
||||||
|
ext.NEXUS_USERNAME = System.getenv('NEXUS_USERNAME')
|
||||||
|
ext.NEXUS_PASSWORD = System.getenv('NEXUS_PASSWORD')
|
||||||
|
}
|
||||||
|
|
||||||
project.apply from: config['push-aar-gradle']
|
project.apply from: config['push-aar-gradle']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user