build: Add artifacting of PR build

This commit is contained in:
Ben Woo 2023-03-03 23:21:36 +08:00
parent 4eca331430
commit 68c97f7ae6
No known key found for this signature in database
GPG Key ID: FB2A3645536E12C8
1 changed files with 16 additions and 0 deletions

View File

@ -18,6 +18,12 @@ jobs:
distribution: 'adopt'
cache: gradle
- name: Get PR number
id: pr
run: echo "::set-output name=pull_request_number::$(gh pr view --json number -q .number || echo "")"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
@ -26,4 +32,14 @@ jobs:
with:
arguments: build
env:
GITHUB_VERSION: pr${{ steps.pr.outputs.pull_request_number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Staging artifact
run: mkdir staging && cp build/libs/*.jar staging
- name: Artifact output
uses: actions/upload-artifact@v2
with:
name: multiverse-core-pr${{ steps.pr.outputs.pull_request_number }}
path: staging