Skip to content

Commit f1b086d

Browse files
committed
Attempt to build and publish from workflows
1 parent 8abee0e commit f1b086d

File tree

3 files changed

+48
-3
lines changed

3 files changed

+48
-3
lines changed

.github/workflows/publish.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: actions/setup-java@v1
12+
with:
13+
java-version: 1.8
14+
- uses: jfrog/setup-jfrog-cli@v1
15+
with:
16+
version: 1.43.2
17+
env:
18+
JF_ARTIFACTORY_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}
19+
- name: Configure JFrog Cli
20+
run: |
21+
jfrog rt gradlec \
22+
--use-wrapper \
23+
--deploy-ivy-desc=false \
24+
--server-id-resolve=repo.spring.io \
25+
--server-id-deploy=repo.spring.io \
26+
--repo-resolve=snapshot \
27+
--repo-deploy=snapshot
28+
echo JFROG_CLI_BUILD_NAME=spring-statemachine >> $GITHUB_ENV
29+
echo JFROG_CLI_BUILD_NUMBER=$GITHUB_RUN_NUMBER >> $GITHUB_ENV
30+
- name: Build and Publish
31+
run: |
32+
jfrog rt gradle clean build artifactoryPublish
33+
jfrog rt build-publish

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ classes
2020
.sts4-cache
2121
.attach_pid*
2222
nexus
23+
.jfrog

build.gradle

+14-3
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,6 @@ project('spring-statemachine-uml') {
421421

422422
project('spring-statemachine-build-tests') {
423423
description = 'Spring State Machine Build Tests'
424-
tasks.findByPath('artifactoryPublish')?.enabled = false
425424

426425
dependencies {
427426
testCompile project(':spring-statemachine-uml')
@@ -535,7 +534,6 @@ project('spring-statemachine-starter') {
535534

536535
configure(sampleProjects()) {
537536
apply plugin: 'org.springframework.boot'
538-
tasks.findByPath('artifactoryPublish')?.enabled = false
539537
// as samples are not published, we can use jdk8
540538
compileJava {
541539
sourceCompatibility = 1.8
@@ -563,7 +561,6 @@ configure(sampleProjects()) {
563561
}
564562

565563
project('spring-statemachine-samples-common') {
566-
tasks.findByPath('artifactoryPublish')?.enabled = false
567564
dependencies {
568565
compile project(':spring-statemachine-core')
569566
compile 'org.springframework.shell:spring-shell'
@@ -575,6 +572,20 @@ project('spring-statemachine-samples-common') {
575572
configure(rootProject) {
576573
description = 'Spring State Machine'
577574

575+
pluginManager.withPlugin('com.jfrog.artifactory') {
576+
artifactory {
577+
publish {
578+
defaults {
579+
properties {
580+
archives '*:*:*:*@zip', 'zip.deployed': false, 'zip.name': 'spring-statemachine', 'zip.displayname': 'Spring Statemachine'
581+
archives '*:*:*:docs@zip', 'zip.type': 'docs'
582+
archives '*:*:*:dist@zip', 'zip.type': 'dist'
583+
}
584+
}
585+
}
586+
}
587+
}
588+
578589
dependencies {
579590
// just used to get version into docs
580591
compile 'org.springframework:spring-core'

0 commit comments

Comments
 (0)