Skip to content

Publish binary version from branch #12

Publish binary version from branch

Publish binary version from branch #12

# This workflow will release project with Gradle
name: Publish binary version from branch
on:
workflow_dispatch:
inputs:
pull_request:
description: 'The suffix of the snapshot that is going to be released (i.e XXXX)'
required: true
env:
PR_NUMBER: ${{ github.event.inputs.pull_request }}
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- uses: ./.github/actions/setup
- name: Release with Gradle
run: |
PR_NUMBER=PR-${{ env.PR_NUMBER }}
sed -i '/version=/ s/-SNAPSHOT/-'"$PR_NUMBER"'-SNAPSHOT/' ./gradle.properties
./gradlew clean build publishAllVersions -Pzowe.deploy.username=$ARTIFACTORY_USERNAME -Pzowe.deploy.password=$ARTIFACTORY_PASSWORD -Partifactory_user=$ARTIFACTORY_USERNAME -Partifactory_password=$ARTIFACTORY_USERNAME -PpullRequest=$PR_NUMBER
env:
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
BRANCH_NAME: ${{ github.ref_name }}
BUILD_NUMBER: ${{ github.run_number }}
- uses: ./.github/actions/teardown