Skip to content

Commit 93f16af

Browse files
Merge pull request #108 from reportportal/feature/EPMRPP-109184
Implemented reusable s3 artifact plugin worflow into build.yml
2 parents 1257e25 + 7b4ccfd commit 93f16af

File tree

2 files changed

+31
-9
lines changed

2 files changed

+31
-9
lines changed

.github/workflows/build.yml

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Build
22

33
on:
4+
workflow_dispatch:
45
pull_request:
56
push:
67
branches:
@@ -11,17 +12,23 @@ on:
1112
- README.md
1213
- gradle.properties
1314

15+
permissions:
16+
id-token: write
17+
contents: read
18+
actions: read
19+
1420
jobs:
1521
build:
1622
runs-on: ubuntu-latest
23+
1724
steps:
1825
- name: Checkout repository
19-
uses: actions/checkout@v2
26+
uses: actions/checkout@v5
2027

2128
- name: Set up JDK 21
22-
uses: actions/setup-java@v2
29+
uses: actions/setup-java@v4
2330
with:
24-
distribution: 'adopt'
31+
distribution: 'temurin'
2532
java-version: '21'
2633

2734
- name: Grant execute permission for gradlew
@@ -35,6 +42,21 @@ jobs:
3542
token: ${{ secrets.GITHUB_TOKEN }}
3643

3744
- name: Build with Gradle
38-
id: build
39-
run: |
40-
./gradlew build
45+
run: ./gradlew build --stacktrace
46+
47+
- name: Upload built jars
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: build-libs
51+
path: build/libs/*.jar
52+
retention-days: 1
53+
54+
upload:
55+
needs: build
56+
if: github.ref_name == 'develop' || startsWith(github.ref_name, 'feature/')
57+
uses: reportportal/.github/.github/workflows/upload-plugin-artifact.yaml@main
58+
with:
59+
plugin_name: ${{ github.event.repository.name }}
60+
branch_name: ${{ github.ref_name }}
61+
run_number: "${{ github.run_number }}"
62+
secrets: inherit

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ dependencies {
4242
implementation 'com.epam.reportportal:plugin-api'
4343
annotationProcessor 'com.epam.reportportal:plugin-api'
4444
} else {
45-
implementation 'com.github.reportportal:commons-dao:ae1f509'
46-
implementation 'com.github.reportportal:plugin-api:e1786c4'
47-
annotationProcessor 'com.github.reportportal:plugin-api:e1786c4'
45+
implementation 'com.github.reportportal:commons-dao:develop-SNAPSHOT'
46+
implementation 'com.github.reportportal:plugin-api:develop-SNAPSHOT'
47+
annotationProcessor 'com.github.reportportal:plugin-api:develop-SNAPSHOT'
4848
}
4949

5050
implementation("org.apache.httpcomponents.client5:httpclient5:5.4.2") // supports gzip encoding

0 commit comments

Comments
 (0)