feat(actions): Player interact entity action #142
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: Build and test with Scenamatica | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
pull_request: | |
branches: | |
- main | |
- develop | |
permissions: | |
pull-requests: write | |
jobs: | |
build: | |
name: Build with Maven | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v3 | |
id: sj | |
with: | |
java-version: 8 | |
distribution: zulu | |
cache: maven | |
- uses: PeyaPeyaPeyang/nmsaction@v2 | |
if: "steps.sj.outputs.cache-hit != 'true'" | |
with: | |
rev: 1.16.5 | |
- name: Install nms into m2 | |
if: "steps.sj.outputs.cache-hit != 'true'" | |
run: | | |
mkdir -p $HOME/.m2/repository | |
cp -a nms-build/.m2/repository/. $HOME/.m2/repository | |
- name: Build with Maven | |
run: mvn -B package --file pom.xml -D"jar.finalName=Scenamatica" -P debug | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: scenamatica | |
path: ScenamaticaPlugin/target/Scenamatica.jar | |
retention-days: 1 | |
if-no-files-found: error | |
test: | |
name: Self-test with Scenamatica | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: scenamatica | |
- name: Run Scenamatica tests | |
uses: teamkun/[email protected] | |
with: | |
plugin: Scenamatica.jar | |
env: | |
NO_SCENAMATICA: true | |
- name: Clean artifacts | |
if: always() | |
uses: geekyeggo/delete-artifact@v2 | |
with: | |
name: scenamatica |