Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
jhqwqmc committed Sep 7, 2024
2 parents 466329b + 85f3873 commit 8eef212
Show file tree
Hide file tree
Showing 1,133 changed files with 29,976 additions and 29,378 deletions.
22 changes: 0 additions & 22 deletions .github/actions/build-adapter/action.yml

This file was deleted.

37 changes: 37 additions & 0 deletions .github/actions/build-engine/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build Paper Engine
description: "Builds the plugin and runs tests"

runs:
using: "composite"
steps:
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: "beta"
- name: Get Flutter dependencies
run: flutter pub get
shell: bash
working-directory: ./app
- name: Run Lint
run: flutter analyze
shell: bash
working-directory: ./app
- name: Run tests
run: flutter test
shell: bash
working-directory: ./app
- name: Build web app
run: flutter build web --release
shell: bash
working-directory: ./app
- name: Test Paper Engine
uses: gradle/gradle-build-action@v2
with:
arguments: engine-paper:test --scan
build-root-directory: ./engine
- name: Build Plugin
uses: gradle/gradle-build-action@v2
with:
arguments: engine-paper:buildRelease --scan
build-root-directory: ./engine

22 changes: 22 additions & 0 deletions .github/actions/build-extension/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "Build Extension"
description: "Builds the extension"

inputs:
extension:
required: true
description: "Name of the extension to build"

runs:
using: "composite"
steps:
- name: Test extension
uses: gradle/gradle-build-action@v2
with:
arguments: :${{ inputs.extension }}:test --scan
build-root-directory: ./extensions
- name: Build Adapter
uses: gradle/gradle-build-action@v2
with:
arguments: :${{ inputs.extension }}:buildRelease --scan
build-root-directory: ./extensions

37 changes: 0 additions & 37 deletions .github/actions/build-plugin/action.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .github/runners/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM ghcr.io/actions/actions-runner:latest

RUN sudo apt update && sudo apt install git libvips-dev -y
30 changes: 0 additions & 30 deletions .github/workflows/build-adapter.yml

This file was deleted.

84 changes: 39 additions & 45 deletions .github/workflows/build-development-jars-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,44 +24,38 @@ jobs:
full_version="${version}-beta-${run_number}"
echo $full_version > version.txt
echo "version=$full_version" >> $GITHUB_OUTPUT
- name: Build Plugin
uses: ./.github/actions/build-plugin
- name: Build Basic Adapter
uses: ./.github/actions/build-adapter
with:
adapter: BasicAdapter
- name: Build Citizens Adapter
uses: ./.github/actions/build-adapter
with:
adapter: CitizensAdapter
- name: Build CombatLogX Adapter
uses: ./.github/actions/build-adapter
with:
adapter: CombatLogXAdapter
- name: Build MythicMobs Adapter
uses: ./.github/actions/build-adapter
with:
adapter: MythicMobsAdapter
- name: Build EntityAdapter
uses: ./.github/actions/build-adapter
- name: Build Engine
uses: ./.github/actions/build-engine
# ----------------------------------------------------------------------------------------------------
- name: Test Extensions
uses: gradle/gradle-build-action@v2
with:
adapter: EntityAdapter
- name: Build RPGRegions Adapter
uses: ./.github/actions/build-adapter
arguments: test --scan
build-root-directory: ./extensions
# ----------------------------------------------------------------------------------------------------
- name: Publish Engine to Beta Maven Repository
uses: gradle/gradle-build-action@v2
with:
adapter: RPGRegionsAdapter
- name: Build SuperiorSkyblock Adapter
uses: ./.github/actions/build-adapter
arguments: publishAllPublicationsToTypewriterBetaRepository -PTypewriterBetaUsername=${{ secrets.MAVEN_USERNAME }} -PTypewriterBetaPassword=${{ secrets.MAVEN_PASSWORD }} --scan
build-root-directory: ./engine
- name: Publish All Extensions to Beta Maven Repository
uses: gradle/gradle-build-action@v2
with:
adapter: SuperiorSkyblockAdapter
- name: Build Vault Adapter
uses: ./.github/actions/build-adapter
arguments: publishAllPublicationsToTypewriterBetaRepository -PTypewriterBetaUsername=${{ secrets.MAVEN_USERNAME }} -PTypewriterBetaPassword=${{ secrets.MAVEN_PASSWORD }} --scan
build-root-directory: ./extensions
- name: Publish Module-Plugin to Beta Maven Repository
uses: gradle/gradle-build-action@v2
with:
adapter: VaultAdapter
- name: Build WorldGuard Adapter
uses: ./.github/actions/build-adapter
arguments: publishAllPublicationsToTypewriterBetaRepository -PTypewriterBetaUsername=${{ secrets.MAVEN_USERNAME }} -PTypewriterBetaPassword=${{ secrets.MAVEN_PASSWORD }} --scan
build-root-directory: ./module-plugin
# ----------------------------------------------------------------------------------------------------
# Has to be after the publish, because it needs to delete the slim jars and only keep the shadowed jars for the modrinth upload
- name: Build Extensions
uses: gradle/gradle-build-action@v2
with:
adapter: WorldGuardAdapter
arguments: buildRelease --scan
build-root-directory: ./extensions
# ----------------------------------------------------------------------------------------------------
- name: Publish Modrinth
uses: Kir-Antipov/[email protected]
id: publish
Expand All @@ -70,16 +64,15 @@ jobs:
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
modrinth-featured: false
files: |
plugin/build/libs/typewriter.jar
adapters/**/build/libs/*.jar
name: "Typewriter v${{ steps.vars.outputs.version }} Development Build"
engine/engine-paper/build/libs/Typewriter.jar
extensions/**/build/libs/*.jar
name: "Typewriter v${{ steps.vars.outputs.version }} Build"
version: "${{ steps.vars.outputs.version }}"
version-type: "beta"
loaders: |
paper
purpur
game-versions: |
[1.21]
[1.21, 1.21.1]
dependencies: |
packetevents
Expand All @@ -89,22 +82,23 @@ jobs:
env:
HANGAR_API_TOKEN: ${{ secrets.HANGAR_API_TOKEN }}
with:
arguments: publishPluginPublicationToHangar --scan
build-root-directory: ./plugin
arguments: engine-paper:publishPluginPublicationToHangar --scan
build-root-directory: ./engine
- name: Add Tag
uses: laputansoft/github-tag-action@v4.6
uses: mathieudutour/github-tag-action@v6.2
with:
github_token: ${{ env.github-token }}
github_token: ${{ secrets.GITHUB_TOKEN }}
default_bump: false
tag: "v${{ steps.vars.outputs.version }}"
custom_tag: "${{ steps.vars.outputs.version }}"
release_branches: develop
- name: Notify Discord
uses: sarisia/actions-status-discord@v1
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
nodetail: true
title: Published Development Build
title: Published Beta Build
description: |
I have published a development build of Typewriter.
I have published a beta build of Typewriter.
Version: ${{ steps.vars.outputs.version }}
[Download](https://modrinth.com/plugin/typewriter/version/${{ steps.publish.outputs.modrinth-version }})
- name: Notify Winston
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build-documentation.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy to GitHub Pages
name: Deploy Documentation

on: [workflow_dispatch]

Expand All @@ -8,6 +8,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: sudo apt update && sudo apt install libvips-dev -y
- uses: actions/setup-node@v3
with:
node-version: 18
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/build-engine.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Build Typewriter Engine

on: [workflow_call,workflow_dispatch]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 21
- name: Build Engine
uses: ./.github/actions/build-engine
- name: Upload Plugin
uses: actions/upload-artifact@v2
with:
name: Typewriter.jar
path: engine/engine-paper/build/libs/Typewriter.jar
30 changes: 30 additions & 0 deletions .github/workflows/build-extension.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build Specified Extension

on:
workflow_call:
inputs:
extension:
required: true
type: string
description: The name of the extension to build

jobs:
build-adapter:
name: Build ${{ inputs.extension }} Extension
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 21
- name: Build Adapter
uses: ./.github/actions/build-extension
with:
extension: ${{ inputs.extension }}
- name: Upload Extension
uses: actions/upload-artifact@v2
with:
name: ${{ inputs.extension }}.jar
path: adapters/${{ inputs.extension }}/build/libs/${{ inputs.extension }}.jar
Loading

0 comments on commit 8eef212

Please sign in to comment.