Skip to content

Commit

Permalink
Add manual release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
pbortnik committed Jul 15, 2022
1 parent e2cd96f commit 0b350db
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 1 deletion.
51 changes: 51 additions & 0 deletions .github/workflows/manually-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Manual Release

on:
workflow_dispatch:
inputs:
version:
description: 'Release version'
required: true
scripts_version:
description: 'Gradle scripts version'
required: true
bom_version:
description: 'Commons bom version'
required: true

env:
GH_USER_NAME: github.actor
SCRIPTS_VERSION: ${{ github.event.inputs.scripts_version }}
BOM_VERSION: ${{ github.event.inputs.bom_version }}
REPOSITORY_URL: 'https://maven.pkg.github.com/'

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Setup git credentials
uses: oleksiyrudenko/gha-git-credentials@v2
with:
name: 'reportportal.io'
email: '[email protected]'
token: ${{ secrets.GITHUB_TOKEN }}

- name: Release with Gradle
id: release
run: |
./gradlew release -PreleaseMode -Pscripts.version=${{env.SCRIPTS_VERSION}} -Pbom.version=${{env.BOM_VERSION}} \
-PgithubUserName=${{env.GH_USER_NAME}} -PgithubToken=${{secrets.GITHUB_TOKEN}} \
-PpublishRepo=${{ env.REPOSITORY_URL }}${{ github.repository }} \
-PgpgPassphrase=${{secrets.GPG_PASSPHRASE}} -PgpgPrivateKey="${{secrets.GPG_PRIVATE_KEY}}"
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ repositories {

dependencyManagement {
imports {
mavenBom(releaseMode ? 'com.epam.reportportal:commons-bom:5.7.0' : 'com.github.reportportal:commons-bom:4b7ed8a')
mavenBom(releaseMode ? 'com.epam.reportportal:commons-bom:' + getProperty('bom.version') : 'com.github.reportportal:commons-bom:4b7ed8a')
}
}

Expand Down

0 comments on commit 0b350db

Please sign in to comment.