Skip to content

Commit 76933f6

Browse files
committed
Workflow file update
1 parent ffecce3 commit 76933f6

2 files changed

Lines changed: 11 additions & 113 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Copyright 2022 EPAM Systems
1+
# Copyright 2025 EPAM Systems
2+
#
23
# Licensed under the Apache License, Version 2.0 (the "License");
34
# you may not use this file except in compliance with the License.
45
# You may obtain a copy of the License at
@@ -31,22 +32,6 @@ on:
3132

3233
jobs:
3334
build:
34-
runs-on: ubuntu-latest
35-
36-
steps:
37-
- name: Checkout repository
38-
uses: actions/checkout@v4
39-
40-
- name: Set up JDK 11
41-
uses: actions/setup-java@v4
42-
with:
43-
distribution: 'temurin'
44-
java-version: '11'
45-
46-
- name: Build with Gradle
47-
run: ./gradlew build
48-
49-
- name: Codecov upload
50-
uses: codecov/codecov-action@v4
51-
with:
52-
token: ${{ secrets.CODECOV_TOKEN }}
35+
uses: reportportal/.github/.github/workflows/agent-java-ci.yml@main
36+
secrets:
37+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/release.yml

Lines changed: 6 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Copyright 2022 EPAM Systems
1+
# Copyright 2025 EPAM Systems
2+
#
23
# Licensed under the Apache License, Version 2.0 (the "License");
34
# you may not use this file except in compliance with the License.
45
# You may obtain a copy of the License at
@@ -25,97 +26,9 @@ on:
2526
- README_TEMPLATE.md
2627
- CHANGELOG.md
2728

28-
env:
29-
VERSION_FILE: gradle.properties
30-
VERSION_EXTRACT_PATTERN: '(?<=version=).+'
31-
CHANGE_LOG_FILE: CHANGELOG.md
32-
CHANGE_LOG_TMP_FILE: CHANGELOG_updated.md
33-
REPOSITORY_URL: 'https://maven.pkg.github.com/'
34-
README_FILE: README.md
35-
README_TEMPLATE_FILE: README_TEMPLATE.md
36-
README_VERSION_PLACEHOLDER: $LATEST_VERSION
37-
3829
jobs:
3930
release:
40-
runs-on: ubuntu-latest
41-
steps:
42-
- name: Checkout repository
43-
uses: actions/checkout@v4
44-
45-
- name: Generate versions
46-
uses: HardNorth/github-version-generate@v1
47-
with:
48-
version-source: file
49-
version-file: ${{ env.VERSION_FILE }}
50-
version-file-extraction-pattern: ${{ env.VERSION_EXTRACT_PATTERN }}
51-
52-
- name: Set up JDK 11
53-
uses: actions/setup-java@v4
54-
with:
55-
distribution: 'temurin'
56-
java-version: '11'
57-
58-
- name: Setup git credentials
59-
uses: oleksiyrudenko/gha-git-credentials@v2-latest
60-
with:
61-
name: 'reportportal.io'
62-
email: 'support@reportportal.io'
63-
token: ${{ secrets.GITHUB_TOKEN }}
64-
65-
- name: Release with Gradle
66-
id: release
67-
run: |
68-
./gradlew release -Prelease.useAutomaticVersion=true -Prelease.releaseVersion=${{ env.RELEASE_VERSION }} \
69-
-Prelease.newVersion=${{ env.NEXT_VERSION }} -PpublishRepo=${{ env.REPOSITORY_URL }}${{ github.repository }} \
70-
-PgithubUserName=${{ github.actor }} -PgithubToken=${{ secrets.GITHUB_TOKEN }} \
71-
-PgpgPassphrase=${{ secrets.GPG_PASSPHRASE }} -PgpgPrivateKey="${{ secrets.GPG_PRIVATE_KEY }}"
72-
73-
- name: Update README.md
74-
id: readmeUpdate
75-
run: |
76-
sed 's/${{ env.README_VERSION_PLACEHOLDER }}/${{ env.RELEASE_VERSION }}/g' ${{ env.README_TEMPLATE_FILE }} > ${{ env.README_FILE }}
77-
git add ${{ env.README_FILE }}
78-
git commit -m "Readme update"
79-
80-
- name: Update CHANGELOG.md
81-
id: changelogUpdate
82-
run: |
83-
sed '/\[Unreleased\]/q' ${{ env.CHANGE_LOG_FILE }} >> ${{ env.CHANGE_LOG_TMP_FILE }}
84-
sed -E '1,/#?#\s*\[Unreleased\]/d' ${{ env.CHANGE_LOG_FILE }} | sed -E '/#?#\s*\[/q' | \
85-
{ echo -e '\n## [${{env.RELEASE_VERSION}}]'; sed '$d'; } >> ${{ env.CHANGE_LOG_TMP_FILE }}
86-
grep -E '#?#\s*\[[0-9]' ${{ env.CHANGE_LOG_FILE }} | head -n1 >> ${{ env.CHANGE_LOG_TMP_FILE }}
87-
sed -E '1,/#?#\s*\[[0-9]/d' ${{ env.CHANGE_LOG_FILE }} >> ${{ env.CHANGE_LOG_TMP_FILE }}
88-
rm ${{ env.CHANGE_LOG_FILE }}
89-
mv ${{ env.CHANGE_LOG_TMP_FILE }} ${{ env.CHANGE_LOG_FILE }}
90-
git add ${{ env.CHANGE_LOG_FILE }}
91-
git commit -m "Changelog update"
92-
git push
93-
94-
- name: Read changelog Entry
95-
id: readChangelogEntry
96-
uses: mindsers/changelog-reader-action@v2
97-
with:
98-
version: ${{ env.RELEASE_VERSION }}
99-
path: ./${{ env.CHANGE_LOG_FILE }}
100-
101-
- name: Create Release
102-
id: createRelease
103-
uses: ncipollo/release-action@v1
104-
with:
105-
tag: ${{ env.RELEASE_VERSION }}
106-
name: Release ${{ env.RELEASE_VERSION }}
107-
body: ${{ steps.readChangelogEntry.outputs.changes }}
108-
109-
- name: Checkout develop branch
110-
uses: actions/checkout@v4
111-
with:
112-
ref: 'develop'
113-
fetch-depth: 0
114-
115-
- name: Merge release branch into develop
116-
id: mergeIntoDevelop
117-
run: |
118-
git merge -m 'Merge master branch into develop after a release' origin/master
119-
git status | (! grep -Fq 'both modified:') || git status | grep -F 'both modified:' \
120-
| { echo -e 'Unable to merge master into develop, merge conflicts:'; (! grep -Eo '[^ ]+$') }
121-
git push origin develop
31+
uses: reportportal/.github/.github/workflows/agent-java-release.yml@main
32+
secrets:
33+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
34+
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}

0 commit comments

Comments
 (0)