Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/epmrpp 98957 add reusable Java workflow with authorization and Jobs service for releases #152

Merged
merged 4 commits into from
Jan 31, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 8 additions & 39 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,13 @@
name: Release
name: Release Workflow

on:
push:
branches:
- master
paths-ignore:
- '.github/**'
- README.md
- gradle.properties

env:
GH_USER_NAME: github.actor
REPOSITORY_URL: 'https://maven.pkg.github.com/'

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

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

- 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 }}
jobs:
publish-artifacts:
uses: reportportal/.github/.github/workflows/java-build-release.yaml@main

- name: Release with Gradle
id: release
run: |
./gradlew release -PreleaseMode \
-PgithubUserName=${{env.GH_USER_NAME}} -PgithubToken=${{secrets.GITHUB_TOKEN}} \
-PgpgPassphrase=${{secrets.GPG_PASSPHRASE}} -PgpgPrivateKey="${{secrets.GPG_PRIVATE_KEY}}"
with:
release_version: ${{ github.event.release.tag_name }}
java_version: "21"