Move publish to ci workflow

This commit is contained in:
Janne Valkealahti
2021-03-26 16:16:51 +00:00
parent f1b086d25c
commit a73831c4c2
2 changed files with 32 additions and 34 deletions

View File

@@ -12,8 +12,9 @@ on:
- master
jobs:
build:
# build and test
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
@@ -40,3 +41,33 @@ jobs:
with:
name: buildlogs
path: build/buildlogs.tar.gz
# if build job succeed, build without tests and publish
publish:
needs: build
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 -x test artifactoryPublish
jfrog rt build-publish

View File

@@ -1,33 +0,0 @@
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