Skip to content

Commit 67f0532

Browse files
committed
Merge branch 'main' into MV5
# Conflicts: # pom.xml
2 parents 0f53ba3 + 6b0ef7e commit 67f0532

20 files changed

+786
-349
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: 'Call: GitHub Release'
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
release_mode:
7+
description: 'Release mode'
8+
required: true
9+
type: string
10+
version_bump:
11+
description: 'Version bump'
12+
required: false
13+
type: string
14+
promote_from:
15+
description: 'Promote from'
16+
required: false
17+
type: string
18+
outputs:
19+
release_created:
20+
description: 'Release created'
21+
value: ${{ jobs.github_release.outputs.release_created }}
22+
tag_name:
23+
description: 'Tag name'
24+
value: ${{ jobs.github_release.outputs.tag_name }}
25+
26+
jobs:
27+
github_release:
28+
uses: Multiverse/Multiverse-Core/.github/workflows/generic.github_release.yml@main
29+
secrets: inherit
30+
with:
31+
plugin_name: multiverse-inventories
32+
release_mode: ${{ inputs.release_mode }}
33+
version_bump: ${{ inputs.version_bump }}
34+
promote_from: ${{ inputs.promote_from }}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: 'Call: Platform Uploads'
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
target_tag:
7+
description: 'Version to upload'
8+
required: true
9+
type: string
10+
upload_modrinth:
11+
description: 'Upload to modrinth.com'
12+
required: true
13+
type: string
14+
upload_dbo:
15+
description: 'Upload to dev.bukkit.org'
16+
required: true
17+
type: string
18+
upload_hangar:
19+
description: 'Upload to hangar.papermc.io'
20+
required: true
21+
type: string
22+
secrets:
23+
MODRINTH_TOKEN:
24+
required: true
25+
DBO_UPLOAD_API_TOKEN:
26+
required: true
27+
HANGAR_UPLOAD_TOKEN:
28+
required: true
29+
30+
jobs:
31+
platform_uploads:
32+
uses: Multiverse/Multiverse-Core/.github/workflows/generic.platform_uploads.yml@main
33+
secrets: inherit
34+
with:
35+
plugin_name: multiverse-inventories
36+
37+
modrinth_project_id: qvdtDX3s
38+
modrinth_dependencies: >
39+
[
40+
{"project_id": "3wmN97b8", "dependency_type": "required"}
41+
]
42+
43+
dbo_project_id: 35839
44+
dbo_project_relations: >
45+
[
46+
{"slug": "multiverse-core", "type": "requiredDependency"},
47+
{"slug": "vault", "type": "optionalDependency"}
48+
]
49+
50+
hangar_slug: Multiverse-Inventories
51+
hangar_plugin_dependencies: >
52+
{ "PAPER": [
53+
{
54+
"name": "Multiverse-Core",
55+
"required": true,
56+
"platforms": ["PAPER"]
57+
}
58+
]}
59+
60+
target_tag: ${{ inputs.target_tag }}
61+
upload_modrinth: ${{ inputs.upload_modrinth }}
62+
upload_dbo: ${{ inputs.upload_dbo }}
63+
upload_hangar: ${{ inputs.upload_hangar }}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: 'Dispatch: Platform Uploads'
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
target_tag:
7+
description: 'Version to upload'
8+
required: true
9+
type: string
10+
upload_modrinth:
11+
description: 'Upload to modrinth.com'
12+
required: true
13+
type: boolean
14+
upload_dbo:
15+
description: 'Upload to dev.bukkit.org'
16+
required: true
17+
type: boolean
18+
upload_hangar:
19+
description: 'Upload to hangar.papermc.io'
20+
required: true
21+
type: boolean
22+
23+
jobs:
24+
dispatch_platform_uploads:
25+
uses: ./.github/workflows/call.platform_uploads.yml
26+
secrets: inherit
27+
with:
28+
target_tag: ${{ github.event.inputs.target_tag }}
29+
upload_modrinth: ${{ github.event.inputs.upload_modrinth }}
30+
upload_dbo: ${{ github.event.inputs.upload_dbo }}
31+
upload_hangar: ${{ github.event.inputs.upload_hangar }}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: 'Dispatch: Promote Release'
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
target_tag:
7+
description: 'Version to promote'
8+
required: true
9+
10+
jobs:
11+
check_version:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Verify input version is prerelease
15+
run: |
16+
if [[ "${{ github.event.inputs.target_tag }}" != *"pre"* ]]; then
17+
echo "Version must be a prerelease"
18+
exit 1
19+
fi
20+
21+
github_release:
22+
needs: check_version
23+
uses: ./.github/workflows/call.github_release.yml
24+
secrets: inherit
25+
with:
26+
release_mode: promote
27+
promote_from: ${{ github.event.inputs.target_tag }}
28+
29+
platform_uploads:
30+
needs: github_release
31+
if: needs.github_release.outputs.release_created == 'true'
32+
uses: ./.github/workflows/call.platform_uploads.yml
33+
secrets: inherit
34+
with:
35+
target_tag: ${{ needs.github_release.outputs.tag_name }}
36+
upload_modrinth: 'true'
37+
upload_dbo: 'true'
38+
upload_hangar: 'true'
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: 'Main: Prerelease'
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
github_release_on_push:
9+
uses: ./.github/workflows/call.github_release.yml
10+
secrets: inherit
11+
with:
12+
release_mode: prerelease
13+
version_bump: prlabel
14+
15+
platform_uploads_on_push:
16+
needs: github_release_on_push
17+
if: needs.github_release_on_push.outputs.release_created == 'true'
18+
uses: ./.github/workflows/call.platform_uploads.yml
19+
secrets: inherit
20+
with:
21+
target_tag: ${{ needs.github_release_on_push.outputs.tag_name }}
22+
upload_modrinth: 'true'
23+
upload_dbo: 'false'
24+
upload_hangar: 'false'
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: 'PR: Require Label'
2+
3+
on:
4+
pull_request:
5+
types: [opened, labeled, unlabeled, synchronize]
6+
branches: [main]
7+
8+
jobs:
9+
require_label:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: mheap/github-action-required-labels@v2
13+
env:
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
with:
16+
mode: exactly
17+
count: 1
18+
labels: "release:major, release:minor, release:patch, no release"

.github/workflows/pr.test.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: 'PR: Test'
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize]
6+
7+
jobs:
8+
test:
9+
uses: Multiverse/Multiverse-Core/.github/workflows/generic.test.yml@main
10+
with:
11+
plugin_name: multiverse-inventories

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,7 @@ debug.log
4343
# Doxygen
4444
/docs/html
4545
debug.txt
46+
47+
# Gradle
48+
.gradle
49+

LICENSE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Copyright (c) 2011, The Multiverse Team All rights reserved.
2+
3+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4+
5+
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the The Multiverse Team nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

0 commit comments

Comments
 (0)