Attempt to build and publish from workflows

This commit is contained in:
Janne Valkealahti
2021-03-26 13:57:59 +00:00
parent 8abee0e4aa
commit f1b086d25c
3 changed files with 48 additions and 3 deletions

33
.github/workflows/publish.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
name: Publish
on:
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 1.8
- uses: jfrog/setup-jfrog-cli@v1
with:
version: 1.43.2
env:
JF_ARTIFACTORY_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}
- name: Configure JFrog Cli
run: |
jfrog rt gradlec \
--use-wrapper \
--deploy-ivy-desc=false \
--server-id-resolve=repo.spring.io \
--server-id-deploy=repo.spring.io \
--repo-resolve=snapshot \
--repo-deploy=snapshot
echo JFROG_CLI_BUILD_NAME=spring-statemachine >> $GITHUB_ENV
echo JFROG_CLI_BUILD_NUMBER=$GITHUB_RUN_NUMBER >> $GITHUB_ENV
- name: Build and Publish
run: |
jfrog rt gradle clean build artifactoryPublish
jfrog rt build-publish

1
.gitignore vendored
View File

@@ -20,3 +20,4 @@ classes
.sts4-cache
.attach_pid*
nexus
.jfrog

View File

@@ -421,7 +421,6 @@ project('spring-statemachine-uml') {
project('spring-statemachine-build-tests') {
description = 'Spring State Machine Build Tests'
tasks.findByPath('artifactoryPublish')?.enabled = false
dependencies {
testCompile project(':spring-statemachine-uml')
@@ -535,7 +534,6 @@ project('spring-statemachine-starter') {
configure(sampleProjects()) {
apply plugin: 'org.springframework.boot'
tasks.findByPath('artifactoryPublish')?.enabled = false
// as samples are not published, we can use jdk8
compileJava {
sourceCompatibility = 1.8
@@ -563,7 +561,6 @@ configure(sampleProjects()) {
}
project('spring-statemachine-samples-common') {
tasks.findByPath('artifactoryPublish')?.enabled = false
dependencies {
compile project(':spring-statemachine-core')
compile 'org.springframework.shell:spring-shell'
@@ -575,6 +572,20 @@ project('spring-statemachine-samples-common') {
configure(rootProject) {
description = 'Spring State Machine'
pluginManager.withPlugin('com.jfrog.artifactory') {
artifactory {
publish {
defaults {
properties {
archives '*:*:*:*@zip', 'zip.deployed': false, 'zip.name': 'spring-statemachine', 'zip.displayname': 'Spring Statemachine'
archives '*:*:*:docs@zip', 'zip.type': 'docs'
archives '*:*:*:dist@zip', 'zip.type': 'dist'
}
}
}
}
}
dependencies {
// just used to get version into docs
compile 'org.springframework:spring-core'