-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (40 loc) · 1.39 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
on:
release:
types: [created]
jobs:
build:
runs-on: macos-latest
steps:
# Step 1: Checkout the code
- name: Checkout Code
uses: actions/checkout@v3
# Step 2: Setup Java environment
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
cache: 'gradle' # Enables caching for Gradle dependencies
# Step 3: Run Gradle build and publish
- name: Build and Publish
run: |
./gradlew check publish --no-configure-on-demand --no-daemon --info
env:
ORG_GRADLE_PROJECT_githubUsername: ${{ github.actor }}
ORG_GRADLE_PROJECT_githubPassword: ${{ secrets.GITHUB_TOKEN }}
# Step 4: Collect all reports and logs
- name: Collect Reports and Logs
if: failure() # Only run if the previous step fails
run: |
mkdir -p reports
# Copy test reports
cp -r flow/build/reports/tests reports/tests || echo "No test reports found"
# Copy Gradle build logs
cp -r flow/build/reports reports/gradle-reports || echo "No Gradle reports found"
# Step 5: Upload all reports and logs
- name: Upload All Reports
if: failure() # Only run if the previous step fails
uses: actions/upload-artifact@v3
with:
name: all-reports
path: reports