ci: update upload-artifact action to v4 #200
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "ci" | |
on: | |
push: | |
branches: | |
- "*" | |
tags: | |
- "v*" | |
pull_request: | |
jobs: | |
spotless: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: "Checkout" | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
fetch-tags: true | |
- | |
name: "Setup JDK" | |
uses: actions/setup-java@v4 | |
with: | |
java-version: "17" | |
distribution: "temurin" | |
- | |
name: "Setup Ghidra" | |
uses: antoniovazquezblanco/[email protected] | |
with: | |
version: "11.1" | |
- | |
name: "Run spotless" | |
run: gradle spotlessCheck | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
checks: "write" | |
strategy: | |
fail-fast: false | |
matrix: | |
ghidra: | |
- "11.1" | |
- "11.1.1" | |
- "11.1.2" | |
steps: | |
- | |
name: "Checkout" | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
fetch-tags: true | |
- | |
name: "Setup JDK" | |
uses: actions/setup-java@v4 | |
with: | |
java-version: "17" | |
distribution: "temurin" | |
- | |
name: "Setup Ghidra" | |
uses: antoniovazquezblanco/[email protected] | |
with: | |
version: ${{ matrix.ghidra }} | |
- | |
name: "Build extension" | |
run: gradle buildExtension | |
- | |
name: "Upload artifacts" | |
uses: actions/upload-artifact@v4 | |
with: | |
path: "dist/*" | |
if-no-files-found: "error" | |
if: ${{ !cancelled() }} | |
- | |
name: "Run tests" | |
uses: coactions/setup-xvfb@v1 | |
with: | |
run: gradle test jacocoTestReport | |
- | |
name: "Upload test results" | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "test-results (${{ matrix.ghidra }})" | |
path: "build/test-results/test/*.xml" | |
if-no-files-found: "error" | |
if: ${{ !cancelled() }} | |
- | |
name: "Upload reports" | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "reports (${{ matrix.ghidra }})" | |
path: "build/reports/*" | |
if-no-files-found: "error" | |
if: ${{ !cancelled() }} | |
release: | |
if: startsWith(github.ref, 'refs/tags/v') | |
needs: | |
- "build" | |
runs-on: ubuntu-latest | |
permissions: | |
contents: "write" | |
steps: | |
- | |
name: "Checkout" | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
fetch-tags: true | |
- | |
name: "Setup JDK" | |
uses: actions/setup-java@v4 | |
with: | |
java-version: "17" | |
distribution: "temurin" | |
java-package: "jre" | |
- | |
name: "Download artifacts" | |
uses: actions/download-artifact@v3 | |
with: | |
name: "artifact" | |
path: "dist/" | |
- | |
name: "Generate release notes" | |
run: ./developer_scripts/generate-release-notes.sh | tee release-notes.md | |
- | |
name: "GitHub release" | |
uses: ncipollo/[email protected] | |
with: | |
artifacts: "dist/*" | |
draft: true | |
bodyFile: "release-notes.md" |