Skip to content

Commit

Permalink
ci: Add dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
PeyaPeyaPeyang committed Jul 31, 2024
1 parent ac9f6b5 commit 51fad6e
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 74 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build-nms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ jobs:
with:
lookup-only: true
path: nms-build/.m2
key: scenamatica-nms
restore-keys: scenamatica-nms
key: nms-maven
restore-keys: nms-maven
- name: Debug Cache Hit
run: "echo Cache hit: ${{ steps.check.outputs.cache-hit }}, ${{ steps.check.outputs.cache-hit == 'true'}}"
build-nms:
name: Build NMS with NMSAction
needs: check-whether-has-to-build
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-scenamatica.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ jobs:
uses: actions/cache@v4
with:
path: nms-build/.m2
key: scenamatica-nms
restore-keys: scenamatica-nms
key: nms-maven
restore-keys: nms-maven
- name: Deploy NMS cache
if: steps.maven-cache.outputs.cache-hit != 'true'
run: |
mv -f nms-build/.m2/repository/repository $HOME/.m2/ -v
- name: Build with Maven
run: |
./Scenamatica/build -D"jar.finalName=Scenamatica" -P debug
./Scenamatica/build.sh -D"jar.finalName=Scenamatica" -P debug
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- main
paths:
- docs/**
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
Expand Down
20 changes: 14 additions & 6 deletions Bookkeeper/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,27 @@
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>papermc-repo</id>
<url>https://repo.papermc.io/repository/maven-public/</url>
</repository>
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
</repository>
<repository>
<id>jitpack</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.kunlab.scenamatica.bookkeeper</groupId>
<artifactId>annotations</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.kunlab.scenamatica</groupId>
<artifactId>ScenamaticaPlugin</artifactId>
<version>1.4.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.destroystokyo.paper</groupId>
<artifactId>paper-api</artifactId>
Expand Down
14 changes: 0 additions & 14 deletions Bookkeeper/run.bat

This file was deleted.

4 changes: 0 additions & 4 deletions Scenamatica/build.bat

This file was deleted.

41 changes: 0 additions & 41 deletions docs/build-references.bat

This file was deleted.

13 changes: 10 additions & 3 deletions docs/build-references.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
#!/bin/bash
#!/bin/sh

# 1. Build Scenamatica.jar
../Scenamatica/build -D"jar.finalName=Scenamatica" -P release
cd ../Scenamatica
chmod +x build.sh

./build.sh -D"jar.finalName=Scenamatica" -P release

if [ $? -ne 0 ]; then
echo "Build failed."
exit 1
fi

# 2. Build ledger
../Bookkeeper/run -o dist -cp "\$paper:1.16.5" -i ../Scenamatica/ScenamaticaPlugin/target/Scenamatica.jar
cd ../Bookkeeper
chmod +x run.sh
./run.sh -o dist -cp "\$paper:1.16.5" -i ../Scenamatica/ScenamaticaPlugin/target/Scenamatica.jar

if [ $? -ne 0 ]; then
echo "Build failed."
exit 1
fi

cd ../docs

# 3. Build templating-tools
CWD=$(pwd)
cd ../Bookkeeper/templating-tools
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "./build-references && pnpm run build:site",
"build": "./build-references.sh && pnpm run build:site",
"build:site": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
Expand Down

0 comments on commit 51fad6e

Please sign in to comment.