Files
spring-statemachine/.github/workflows/central-sync-create.yml
2024-03-21 08:55:38 +00:00

55 lines
1.5 KiB
YAML

name: Central Sync Create
on:
workflow_dispatch:
inputs:
buildName:
description: "Artifactory build name"
required: true
buildNumber:
description: "Artifactory build number"
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
# to get spec file in .github
- uses: actions/checkout@v2
# Setup jfrog cli
- uses: jfrog/setup-jfrog-cli@v4
with:
version: 2.52.10
env:
JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}
# Extract build id from input
- name: Extract Build Id
run: |
echo JFROG_CLI_BUILD_NAME=${{ github.event.inputs.buildName }} >> $GITHUB_ENV
echo JFROG_CLI_BUILD_NUMBER=${{ github.event.inputs.buildNumber }} >> $GITHUB_ENV
# Download released files
- name: Download Release Files
run: |
jf rt download \
--spec .github/release-files-spec.json \
--spec-vars "buildname=$JFROG_CLI_BUILD_NAME;buildnumber=$JFROG_CLI_BUILD_NUMBER"
# Create checksums, signatures and create staging repo on central and upload
- uses: spring-io/nexus-sync-action@main
id: nexus
with:
username: ${{ secrets.OSSRH_S01_TOKEN_USERNAME }}
password: ${{ secrets.OSSRH_S01_TOKEN_PASSWORD }}
staging-profile-name: ${{ secrets.OSSRH_STAGING_PROFILE_NAME }}
create: true
upload: true
generate-checksums: true
# Print staging repo id
- name: Print Staging Repo Id
run: echo ${{ steps.nexus.outputs.staged-repository-id }}