-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from Multiverse/revamp-actions
feat: Revamp actions with new release and upload system
- Loading branch information
Showing
13 changed files
with
205 additions
and
257 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: 'Call: GitHub Release' | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
release_mode: | ||
description: 'Release mode' | ||
required: true | ||
type: string | ||
version_bump: | ||
description: 'Version bump' | ||
required: false | ||
type: string | ||
promote_from: | ||
description: 'Promote from' | ||
required: false | ||
type: string | ||
outputs: | ||
release_created: | ||
description: 'Release created' | ||
value: ${{ jobs.github_release.outputs.release_created }} | ||
tag_name: | ||
description: 'Tag name' | ||
value: ${{ jobs.github_release.outputs.tag_name }} | ||
|
||
jobs: | ||
github_release: | ||
uses: Multiverse/Multiverse-Core/.github/workflows/generic.github_release.yml@main | ||
secrets: inherit | ||
with: | ||
plugin_name: multiverse-signportals | ||
release_mode: ${{ inputs.release_mode }} | ||
version_bump: ${{ inputs.version_bump }} | ||
promote_from: ${{ inputs.promote_from }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: 'Call: Platform Uploads' | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
target_tag: | ||
description: 'Version to upload' | ||
required: true | ||
type: string | ||
upload_modrinth: | ||
description: 'Upload to modrinth.com' | ||
required: true | ||
type: string | ||
upload_dbo: | ||
description: 'Upload to dev.bukkit.org' | ||
required: true | ||
type: string | ||
upload_hangar: | ||
description: 'Upload to hangar.papermc.io' | ||
required: true | ||
type: string | ||
secrets: | ||
MODRINTH_TOKEN: | ||
required: true | ||
DBO_UPLOAD_API_TOKEN: | ||
required: true | ||
HANGAR_UPLOAD_TOKEN: | ||
required: true | ||
|
||
jobs: | ||
platform_uploads: | ||
uses: Multiverse/Multiverse-Core/.github/workflows/generic.platform_uploads.yml@main | ||
secrets: inherit | ||
with: | ||
plugin_name: multiverse-signportals | ||
|
||
modrinth_project_id: WuErDeI1 | ||
modrinth_dependencies: > | ||
[ | ||
{"project_id": "3wmN97b8", "dependency_type": "required"} | ||
] | ||
dbo_project_id: 31376 | ||
dbo_project_relations: > | ||
[ | ||
{"slug": "multiverse-core", "type": "requiredDependency"} | ||
] | ||
hangar_slug: Multiverse-SignPortals | ||
hangar_plugin_dependencies: > | ||
{ "PAPER": [ | ||
{ | ||
"name": "Multiverse-Core", | ||
"required": true, | ||
"namespace": { | ||
"owner": "Multiverse", | ||
"slug": "Multiverse-Core" | ||
} | ||
} | ||
]} | ||
target_tag: ${{ inputs.target_tag }} | ||
upload_modrinth: ${{ inputs.upload_modrinth }} | ||
upload_dbo: ${{ inputs.upload_dbo }} | ||
upload_hangar: ${{ inputs.upload_hangar }} |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: 'Dispatch: Platform Uploads' | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
target_tag: | ||
description: 'Version to upload' | ||
required: true | ||
type: string | ||
upload_modrinth: | ||
description: 'Upload to modrinth.com' | ||
required: true | ||
type: boolean | ||
upload_dbo: | ||
description: 'Upload to dev.bukkit.org' | ||
required: true | ||
type: boolean | ||
upload_hangar: | ||
description: 'Upload to hangar.papermc.io' | ||
required: true | ||
type: boolean | ||
|
||
jobs: | ||
dispatch_platform_uploads: | ||
uses: ./.github/workflows/call.platform_uploads.yml | ||
secrets: inherit | ||
with: | ||
target_tag: ${{ github.event.inputs.target_tag }} | ||
upload_modrinth: ${{ github.event.inputs.upload_modrinth }} | ||
upload_dbo: ${{ github.event.inputs.upload_dbo }} | ||
upload_hangar: ${{ github.event.inputs.upload_hangar }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: 'Dispatch: Promote Release' | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
target_tag: | ||
description: 'Version to promote' | ||
required: true | ||
|
||
jobs: | ||
check_version: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Verify input version is prerelease | ||
run: | | ||
if [[ "${{ github.event.inputs.target_tag }}" != *"pre"* ]]; then | ||
echo "Version must be a prerelease" | ||
exit 1 | ||
fi | ||
github_release: | ||
needs: check_version | ||
uses: ./.github/workflows/call.github_release.yml | ||
secrets: inherit | ||
with: | ||
release_mode: promote | ||
promote_from: ${{ github.event.inputs.target_tag }} | ||
|
||
platform_uploads: | ||
needs: github_release | ||
if: needs.github_release.outputs.release_created == 'true' | ||
uses: ./.github/workflows/call.platform_uploads.yml | ||
secrets: inherit | ||
with: | ||
target_tag: ${{ needs.github_release.outputs.tag_name }} | ||
upload_modrinth: 'true' | ||
upload_dbo: 'true' | ||
upload_hangar: 'true' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: 'Main: Prerelease' | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
github_release_on_push: | ||
uses: ./.github/workflows/call.github_release.yml | ||
secrets: inherit | ||
with: | ||
release_mode: prerelease | ||
version_bump: prlabel | ||
|
||
platform_uploads_on_push: | ||
needs: github_release_on_push | ||
if: needs.github_release_on_push.outputs.release_created == 'true' | ||
uses: ./.github/workflows/call.platform_uploads.yml | ||
secrets: inherit | ||
with: | ||
target_tag: ${{ needs.github_release_on_push.outputs.tag_name }} | ||
upload_modrinth: 'true' | ||
upload_dbo: 'false' | ||
upload_hangar: 'false' |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: 'PR: Test' | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize] | ||
|
||
jobs: | ||
test: | ||
uses: Multiverse/Multiverse-Core/.github/workflows/generic.test.yml@main | ||
with: | ||
plugin_name: multiverse-signportals |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.