diff --git a/README.md b/README.md index 07e7685..834e2df 100644 --- a/README.md +++ b/README.md @@ -288,6 +288,32 @@ Each build is different, and some builds produce more Gradle User Home content t [Cache debugging ](#cache-debugging-and-analysis) can provide insight into which cache entries are the largest, and you can selectively [exclude content using `gradle-home-cache-exclude`](#gradle-user-home-cache-tuning). +## Saving build outputs + +By default, a GitHub Actions workflow using `gradle-build-action` will record the log output and any Build Scan links for your build, +but any output files generated by the build will not be saved. + +To save selected files from your build execution, you can use the core [Upload-Artifact](https://github.com/actions/upload-artifact) action. +For example: + +``` +jobs: + gradle: + runs-on: ubuntu-latest + steps: + - name: Checkout project sources + uses: actions/checkout@v2 + - name: Setup Gradle + uses: gradle/gradle-build-action@v2 + - name: Run build with Gradle wrapper + run: ./gradlew build --scan + - name: Upload build reports + uses: actions/upload-artifact@v3 + with: + name: build-reports + path: build/reports/ +``` + ## Build scans If your build publishes a [build scan](https://gradle.com/build-scans/) the `gradle-build-action` action will: