mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-21 18:15:26 +01:00
feat: Revamp github actions workflow
This commit is contained in:
parent
3f5a17e39a
commit
61254bfccb
84
.github/workflows/call.github_release.yml
vendored
Normal file
84
.github/workflows/call.github_release.yml
vendored
Normal file
@ -0,0 +1,84 @@
|
||||
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:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
release_created: ${{ steps.release.outputs.release_created }}
|
||||
tag_name: ${{ steps.release.outputs.tag_name }}
|
||||
steps:
|
||||
- name: Echo inputs
|
||||
run: |
|
||||
echo "release_mode: ${{ inputs.release_mode }}"
|
||||
echo "version_bump: ${{ inputs.version_bump }}"
|
||||
echo "promote_from: ${{ inputs.promote_from }}"
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ inputs.promote_from }}
|
||||
|
||||
- uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '11'
|
||||
distribution: 'adopt'
|
||||
cache: gradle
|
||||
|
||||
- name: Validate Gradle wrapper
|
||||
uses: gradle/wrapper-validation-action@v1
|
||||
|
||||
# - name: Build and test
|
||||
# uses: gradle/gradle-build-action@v2
|
||||
# with:
|
||||
# arguments: clean build -x assemble -x shadowJar
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Create release
|
||||
id: release
|
||||
uses: benwoo1110/semantic-release-action@v1.0.0
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
release_mode: ${{ inputs.release_mode }}
|
||||
version_bump: ${{ inputs.version_bump }}
|
||||
promote_from: ${{ inputs.promote_from }}
|
||||
|
||||
- name: Build package # change to publish
|
||||
if: steps.release.outputs.release_created == 'true'
|
||||
uses: gradle/gradle-build-action@v2
|
||||
with:
|
||||
arguments: build -x checkStyleMain -x checkStyleTest -x test
|
||||
env:
|
||||
GITHUB_VERSION: ${{ steps.release.outputs.publish_version }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Upload release artifact
|
||||
if: steps.release.outputs.release_created == 'true'
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: build/libs/multiverse-core-${{ steps.release.outputs.publish_version }}.jar
|
||||
asset_name: multiverse-core-${{ steps.release.outputs.tag_name }}.jar
|
||||
tag: ${{ steps.release.outputs.tag_name }}
|
92
.github/workflows/call.platform_uploads.yml
vendored
Normal file
92
.github/workflows/call.platform_uploads.yml
vendored
Normal file
@ -0,0 +1,92 @@
|
||||
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
|
||||
secrets:
|
||||
MODRINTH_TOKEN:
|
||||
required: true
|
||||
DBO_UPLOAD_API_TOKEN:
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
platform_uploads:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Get release info
|
||||
id: release-info
|
||||
uses: cardinalby/git-get-release-action@1.2.4
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag: ${{ inputs.target_tag }}
|
||||
|
||||
- name: Download release artifact
|
||||
id: release-artifact
|
||||
uses: dsaltares/fetch-gh-release-asset@1.1.1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
version: tags/${{ steps.release-info.outputs.tag_name }}
|
||||
file: multiverse-core-${{ steps.release-info.outputs.tag_name }}.jar
|
||||
|
||||
- name: Parse release type
|
||||
run: |
|
||||
if [[ "${{ steps.release-info.outputs.prerelease }}" == "true" ]]; then
|
||||
echo Setting RELEASE_TYPE to Beta
|
||||
echo "RELEASE_TYPE=Beta" >> $GITHUB_ENV
|
||||
else
|
||||
echo Setting RELEASE_TYPE to Release
|
||||
echo "RELEASE_TYPE=Release" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: echo inputs
|
||||
run: |
|
||||
echo "upload_modrinth: ${{ inputs.upload_modrinth }}"
|
||||
echo "upload_dbo: ${{ inputs.upload_dbo }}"
|
||||
echo "RELEASE_TYPE: ${{ env.RELEASE_TYPE }}"
|
||||
|
||||
- name: Upload to Modrinth
|
||||
if: inputs.upload_modrinth == 'true'
|
||||
uses: benwoo1110/modrinth-upload-action@v1.0.0
|
||||
with:
|
||||
api_token: ${{ secrets.MODRINTH_TOKEN }}
|
||||
project_id: 3wmN97b8
|
||||
version_number: ${{ steps.release-info.outputs.tag_name }}
|
||||
files: '["${{ github.workspace }}/multiverse-core-${{ steps.release-info.outputs.tag_name }}.jar"]'
|
||||
name: ${{ steps.release-info.outputs.tag_name }}
|
||||
changelog: ${{ steps.release-artifact.outputs.body }}
|
||||
game_versions: 1.20.1, 1.20, 1.19.4, 1.19.3, 1.19.2, 1.19.1, 1.19, 1.18.2, 1.18.1, 1.18, 1.17.1, 1.17, 1.16.5, 1.16.4, 1.16.3, 1.16.2, 1.16.1, 1.16, 1.15.2, 1.15.1, 1.15, 1.14.4, 1.14.3, 1.14.2, 1.14.1, 1.14, 1.13.2, 1.13.1, 1.13
|
||||
version_type: ${{ env.RELEASE_TYPE }}
|
||||
loaders: bukkit, spigot, paper
|
||||
|
||||
- name: Upload to DBO
|
||||
if: inputs.upload_dbo == 'true'
|
||||
uses: benwoo1110/dbo-upload-action@v1.0.1
|
||||
with:
|
||||
api_token: ${{ secrets.DBO_UPLOAD_API_TOKEN }}
|
||||
project_id: 30765
|
||||
changelog: ${{ steps.release-artifact.outputs.body }}
|
||||
changelog_type: markdown
|
||||
display_name: ${{ steps.release-info.outputs.tag_name }}
|
||||
game_versions: 1.20.1, 1.20, 1.19.4, 1.19.3, 1.19.2, 1.19.1, 1.19, 1.18.2, 1.18.1, 1.18, 1.17, 1.16, 1.15, 1.14, 1.13
|
||||
release_type: ${{ env.RELEASE_TYPE }}
|
||||
project_relations: >
|
||||
[
|
||||
{"slug": "multiverse-portals", "type": "optionalDependency"},
|
||||
{"slug": "multiverse-netherportals", "type": "optionalDependency"},
|
||||
{"slug": "multiverse-signportals", "type": "optionalDependency"},
|
||||
{"slug": "multiverse-inventories", "type": "optionalDependency"}
|
||||
]
|
||||
file_path: ${{ github.workspace }}/multiverse-core-${{ steps.release-info.outputs.tag_name }}.jar
|
55
.github/workflows/dbo_upload.yml
vendored
55
.github/workflows/dbo_upload.yml
vendored
@ -1,55 +0,0 @@
|
||||
name: Manually upload specific release to dev.bukkit.org
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'Release to upload'
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
manually_upload_dbo_release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Get release info
|
||||
id: release-info
|
||||
uses: cardinalby/git-get-release-action@1.2.4
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag: ${{ github.event.inputs.version }}
|
||||
|
||||
- name: Download release artifact
|
||||
id: release-artifact
|
||||
uses: dsaltares/fetch-gh-release-asset@1.1.1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
version: tags/${{ steps.release-info.outputs.tag_name }}
|
||||
file: multiverse-core-${{ steps.release-info.outputs.tag_name }}.jar
|
||||
|
||||
- name: Parse release type
|
||||
run: |
|
||||
if [[ "${{ steps.release-info.outputs.prerelease }}" == "true" ]]; then
|
||||
echo "RELEASE_TYPE=beta" >> $GITHUB_ENV
|
||||
else
|
||||
echo "RELEASE_TYPE=release" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: Upload to dev.bukkit.org
|
||||
uses: benwoo1110/dbo-upload-action@v0.1.0
|
||||
with:
|
||||
api_token: ${{ secrets.DBO_UPLOAD_API_TOKEN }}
|
||||
project_id: 30765
|
||||
changelog: ${{ steps.release-info.outputs.body }}
|
||||
changelog_type: markdown
|
||||
display_name: ${{ steps.release-artifact.outputs.version }}
|
||||
game_versions: 1.13, 1.14, 1.15, 1.16, 1.17, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1
|
||||
release_type: ${{ env.RELEASE_TYPE }}
|
||||
project_relations: >
|
||||
[
|
||||
{"slug": "multiverse-portals", "type": "optionalDependency"},
|
||||
{"slug": "multiverse-netherportals", "type": "optionalDependency"},
|
||||
{"slug": "multiverse-signportals", "type": "optionalDependency"},
|
||||
{"slug": "multiverse-inventories", "type": "optionalDependency"}
|
||||
]
|
||||
file_path: ${{ github.workspace }}/multiverse-core-${{ steps.release-artifact.outputs.version }}.jar
|
26
.github/workflows/dispatch.platform_uploads.yml
vendored
Normal file
26
.github/workflows/dispatch.platform_uploads.yml
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
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
|
||||
|
||||
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 }}
|
37
.github/workflows/dispatch.promote_release.yml
vendored
Normal file
37
.github/workflows/dispatch.promote_release.yml
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
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'
|
23
.github/workflows/main.prerelease.yml
vendored
Normal file
23
.github/workflows/main.prerelease.yml
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
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: patch # change to 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'
|
53
.github/workflows/modrinth_upload.yml
vendored
53
.github/workflows/modrinth_upload.yml
vendored
@ -1,53 +0,0 @@
|
||||
name: Manually upload specific release to modrinth.com
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'Release to upload'
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
manually_upload_modrinth_release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Get release info
|
||||
id: release-info
|
||||
uses: cardinalby/git-get-release-action@1.2.4
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag: ${{ github.event.inputs.version }}
|
||||
|
||||
- name: Modify version scheme
|
||||
run: |
|
||||
if [[ "${{ steps.release-info.outputs.tag_name }}" == *"pre"* ]]; then
|
||||
echo "Replacing prerelease version scheme with SNAPSHOT"
|
||||
echo "VERSION=$(echo ${{ steps.release-info.outputs.tag_name }} | sed -E 's/-pre.*/-SNAPSHOT/')" >> $GITHUB_ENV
|
||||
else
|
||||
echo "Using release version scheme"
|
||||
echo "VERSION=${{ steps.release-info.outputs.tag_name }}" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: Parse release type
|
||||
run: |
|
||||
if [[ "${{ steps.release-info.outputs.prerelease }}" == "true" ]]; then
|
||||
echo "RELEASE_TYPE=beta" >> $GITHUB_ENV
|
||||
else
|
||||
echo "RELEASE_TYPE=release" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ steps.release-info.outputs.tag_name }}
|
||||
|
||||
- name: Upload to modrinth.com
|
||||
uses: gradle/gradle-build-action@v2
|
||||
with:
|
||||
arguments: build modrinth
|
||||
env:
|
||||
GITHUB_VERSION: ${{ env.VERSION }}
|
||||
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
|
||||
CHANGELOG: ${{ steps.release-info.outputs.body }}
|
||||
VERSION_NUMBER: ${{ steps.release-info.outputs.tag_name }}
|
||||
VERSION_TYPE: ${{ env.RELEASE_TYPE }}
|
@ -1,4 +1,4 @@
|
||||
name: Require PR Labels
|
||||
name: 'PR: Require Label'
|
||||
|
||||
on:
|
||||
pull_request:
|
@ -1,4 +1,4 @@
|
||||
name: Run unit tests against all PRs
|
||||
name: 'PR: Test'
|
||||
|
||||
on:
|
||||
pull_request:
|
109
.github/workflows/promote_release.yml
vendored
109
.github/workflows/promote_release.yml
vendored
@ -1,109 +0,0 @@
|
||||
name: Manually promote prerelease to release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'Version to promote'
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
manually_promote_release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Verify input version is prerelease
|
||||
run: |
|
||||
if [[ "${{ github.event.inputs.version }}" != *"pre"* ]]; then
|
||||
echo "Version must be a prerelease"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Get release info
|
||||
id: get-release
|
||||
uses: cardinalby/git-get-release-action@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
with:
|
||||
tag: ${{ github.event.inputs.version }}
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ steps.get-release.outputs.tag_name }}
|
||||
|
||||
- uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '11'
|
||||
distribution: 'adopt'
|
||||
cache: gradle
|
||||
|
||||
- name: Validate Gradle wrapper
|
||||
uses: gradle/wrapper-validation-action@v1
|
||||
|
||||
- name: Build and test
|
||||
uses: gradle/gradle-build-action@v2
|
||||
with:
|
||||
arguments: clean build -x assemble -x shadowJar
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Create release
|
||||
id: release
|
||||
uses: benwoo1110/semantic-release-action@main
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
release_mode: promote
|
||||
promote_from: ${{ github.event.inputs.version }}
|
||||
|
||||
- name: Publish package
|
||||
uses: gradle/gradle-build-action@v2
|
||||
with:
|
||||
arguments: publish
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITHUB_VERSION: ${{ steps.release.outputs.publish_version }}
|
||||
|
||||
- name: Upload release artifact
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: build/libs/multiverse-core-${{ steps.release.outputs.publish_version }}.jar
|
||||
asset_name: multiverse-core-${{ steps.release.outputs.tag_name }}.jar
|
||||
tag: ${{ steps.release.outputs.tag_name }}
|
||||
|
||||
- name: Download release artifact
|
||||
id: release-artifact
|
||||
uses: dsaltares/fetch-gh-release-asset@1.1.1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
version: tags/${{ steps.release.outputs.tag_name }}
|
||||
file: multiverse-core-${{ steps.release.outputs.tag_name }}.jar
|
||||
|
||||
- name: Upload to modrinth.com
|
||||
uses: gradle/gradle-build-action@v2
|
||||
with:
|
||||
arguments: build modrinth
|
||||
env:
|
||||
GITHUB_VERSION: ${{ steps.release.outputs.publish_version }}
|
||||
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
|
||||
CHANGELOG: ${{ steps.release.outputs.body }}
|
||||
VERSION_NUMBER: ${{ steps.release.outputs.tag_name }}
|
||||
VERSION_TYPE: ${{ steps.release.outputs.release_type }}
|
||||
|
||||
- name: Upload to dev.bukkit.org
|
||||
uses: benwoo1110/dbo-upload-action@v0.2.0
|
||||
with:
|
||||
api_token: ${{ secrets.DBO_UPLOAD_API_TOKEN }}
|
||||
project_id: 30765
|
||||
changelog: ${{ steps.release.outputs.body }}
|
||||
changelog_type: markdown
|
||||
display_name: ${{ steps.release.outputs.tag_name }}
|
||||
game_versions: 1.13, 1.14, 1.15, 1.16, 1.17, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1
|
||||
release_type: ${{ steps.release.outputs.release_type }}
|
||||
project_relations: >
|
||||
[
|
||||
{"slug": "multiverse-portals", "type": "optionalDependency"},
|
||||
{"slug": "multiverse-netherportals", "type": "optionalDependency"},
|
||||
{"slug": "multiverse-signportals", "type": "optionalDependency"},
|
||||
{"slug": "multiverse-inventories", "type": "optionalDependency"}
|
||||
]
|
||||
file_path: ${{ github.workspace }}/multiverse-core-${{ steps.release.outputs.tag_name }}.jar
|
93
.github/workflows/release.yml
vendored
93
.github/workflows/release.yml
vendored
@ -1,93 +0,0 @@
|
||||
name: Create Release Version & Publish Package
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
release_on_push:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '11'
|
||||
distribution: 'adopt'
|
||||
cache: gradle
|
||||
|
||||
- name: Validate Gradle wrapper
|
||||
uses: gradle/wrapper-validation-action@v1
|
||||
|
||||
- name: Build and test
|
||||
uses: gradle/gradle-build-action@v2
|
||||
with:
|
||||
arguments: clean build -x assemble -x shadowJar
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Create release
|
||||
id: release
|
||||
uses: benwoo1110/semantic-release-action@main
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
version_bump: prlabel
|
||||
release_mode: prerelease
|
||||
|
||||
- name: Publish package
|
||||
if: steps.release.outputs.release_created == 'true'
|
||||
uses: gradle/gradle-build-action@v2
|
||||
with:
|
||||
arguments: publish
|
||||
env:
|
||||
GITHUB_VERSION: ${{ steps.release.outputs.publish_version }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Upload release artifact
|
||||
if: steps.release.outputs.release_created == 'true'
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: build/libs/multiverse-core-${{ steps.release.outputs.publish_version }}.jar
|
||||
asset_name: multiverse-core-${{ steps.release.outputs.tag_name }}.jar
|
||||
tag: ${{ steps.release.outputs.tag_name }}
|
||||
|
||||
- name: Download release artifact
|
||||
if: steps.release.outputs.release_created == 'true'
|
||||
uses: dsaltares/fetch-gh-release-asset@1.1.1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
version: tags/${{ steps.release.outputs.tag_name }}
|
||||
file: multiverse-core-${{ steps.release.outputs.tag_name }}.jar
|
||||
|
||||
- name: Upload to modrinth.com
|
||||
if: steps.release.outputs.release_created == 'true'
|
||||
uses: gradle/gradle-build-action@v2
|
||||
with:
|
||||
arguments: build modrinth -x checkstyleMain -x checkstyleTest
|
||||
env:
|
||||
GITHUB_VERSION: ${{ steps.release.outputs.publish_version }}
|
||||
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
|
||||
CHANGELOG: ${{ steps.release.outputs.body }}
|
||||
VERSION_NUMBER: ${{ steps.release.outputs.tag_name }}
|
||||
VERSION_TYPE: ${{ steps.release.outputs.release_type }}
|
||||
|
||||
- name: Upload to dev.bukkit.org
|
||||
if: steps.release.outputs.release_created == 'true'
|
||||
uses: benwoo1110/dbo-upload-action@v0.2.0
|
||||
with:
|
||||
api_token: ${{ secrets.DBO_UPLOAD_API_TOKEN }}
|
||||
project_id: 30765
|
||||
changelog: ${{ steps.release.outputs.body }}
|
||||
changelog_type: markdown
|
||||
display_name: ${{ steps.release.outputs.tag_name }}
|
||||
game_versions: 1.13, 1.14, 1.15, 1.16, 1.17, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1
|
||||
release_type: ${{ steps.release.outputs.release_type }}
|
||||
project_relations: >
|
||||
[
|
||||
{"slug": "multiverse-portals", "type": "optionalDependency"},
|
||||
{"slug": "multiverse-netherportals", "type": "optionalDependency"},
|
||||
{"slug": "multiverse-signportals", "type": "optionalDependency"},
|
||||
{"slug": "multiverse-inventories", "type": "optionalDependency"}
|
||||
]
|
||||
file_path: ${{ github.workspace }}/multiverse-core-${{ steps.release.outputs.tag_name }}.jar
|
Loading…
Reference in New Issue
Block a user