mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-25 12:05:14 +01:00
Merge branch 'main' into update-gradle
This commit is contained in:
commit
3a32d02593
47
.github/workflows/publish.yml
vendored
47
.github/workflows/publish.yml
vendored
@ -1,47 +0,0 @@
|
|||||||
name: Publish package to GitHub Packages
|
|
||||||
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [created]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
publish:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
packages: write
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- uses: actions/setup-java@v3
|
|
||||||
with:
|
|
||||||
java-version: '11'
|
|
||||||
distribution: 'adopt'
|
|
||||||
cache: gradle
|
|
||||||
|
|
||||||
- name: Get release
|
|
||||||
id: get_release
|
|
||||||
uses: bruceadams/get-release@v1.3.2
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
|
||||||
|
|
||||||
- name: Validate Gradle wrapper
|
|
||||||
uses: gradle/wrapper-validation-action@v1
|
|
||||||
|
|
||||||
- name: Publish package
|
|
||||||
uses: gradle/gradle-build-action@v2
|
|
||||||
with:
|
|
||||||
arguments: publish
|
|
||||||
env:
|
|
||||||
GITHUB_VERSION: ${{ steps.get_release.outputs.tag }}
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Upload release artifact
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.get_release.outputs.upload_url }}
|
|
||||||
asset_path: build/libs/Multiverse-Core-${{ steps.get_release.outputs.tag }}.jar
|
|
||||||
asset_name: Multiverse-Core-${{ steps.get_release.outputs.tag }}.jar
|
|
||||||
asset_content_type: application/java-archive
|
|
42
.github/workflows/release.yml
vendored
42
.github/workflows/release.yml
vendored
@ -8,6 +8,24 @@ jobs:
|
|||||||
release_on_push:
|
release_on_push:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
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: Test & Build
|
||||||
|
uses: gradle/gradle-build-action@v2
|
||||||
|
with:
|
||||||
|
arguments: clean build -x assemble -x shadowJar
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
uses: rymndhng/release-on-push-action@v0.27.0
|
uses: rymndhng/release-on-push-action@v0.27.0
|
||||||
env:
|
env:
|
||||||
@ -17,3 +35,27 @@ jobs:
|
|||||||
tag_prefix: v
|
tag_prefix: v
|
||||||
release_name: "Release <RELEASE_VERSION>"
|
release_name: "Release <RELEASE_VERSION>"
|
||||||
use_github_release_notes: true
|
use_github_release_notes: true
|
||||||
|
|
||||||
|
- name: Get release
|
||||||
|
id: get_release
|
||||||
|
uses: bruceadams/get-release@v1.3.2
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
|
|
||||||
|
- name: Publish package
|
||||||
|
uses: gradle/gradle-build-action@v2
|
||||||
|
with:
|
||||||
|
arguments: publish
|
||||||
|
env:
|
||||||
|
GITHUB_VERSION: ${{ steps.get_release.outputs.tag }}
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Upload release artifact
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.get_release.outputs.upload_url }}
|
||||||
|
asset_path: build/libs/Multiverse-Core-${{ steps.get_release.outputs.tag }}.jar
|
||||||
|
asset_name: Multiverse-Core-${{ steps.get_release.outputs.tag }}.jar
|
||||||
|
asset_content_type: application/java-archive
|
||||||
|
11
build.gradle
11
build.gradle
@ -5,7 +5,6 @@ plugins {
|
|||||||
id 'maven-publish'
|
id 'maven-publish'
|
||||||
id 'checkstyle'
|
id 'checkstyle'
|
||||||
id 'com.github.johnrengelman.shadow' version '7.1.2'
|
id 'com.github.johnrengelman.shadow' version '7.1.2'
|
||||||
id 'org.jetbrains.intellij' version '1.1'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
version = System.getenv('GITHUB_VERSION')?.substring(1) ?: 'local'
|
version = System.getenv('GITHUB_VERSION')?.substring(1) ?: 'local'
|
||||||
@ -133,6 +132,10 @@ processResources {
|
|||||||
filesMatching('plugin.yml') {
|
filesMatching('plugin.yml') {
|
||||||
expand props
|
expand props
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This task should never be skipped. The tests depend on this having been run but we want the new version number
|
||||||
|
// that is created after tests are run and before we run again to publish.
|
||||||
|
outputs.upToDateWhen { false }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -168,9 +171,3 @@ shadowJar {
|
|||||||
|
|
||||||
build.dependsOn shadowJar
|
build.dependsOn shadowJar
|
||||||
jar.enabled = false
|
jar.enabled = false
|
||||||
|
|
||||||
|
|
||||||
intellij {
|
|
||||||
instrumentCode = true
|
|
||||||
downloadSources = false
|
|
||||||
}
|
|
||||||
|
@ -3,12 +3,3 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
rootProject.name = 'Multiverse-Core'
|
rootProject.name = 'Multiverse-Core'
|
||||||
|
|
||||||
// Disable the tasks we don't from the IntelliJ plugin
|
|
||||||
startParameter.excludedTaskNames = [
|
|
||||||
'patchPluginXml',
|
|
||||||
'prepareSandbox',
|
|
||||||
'buildSearchableOptions',
|
|
||||||
'jarSearchableOptions',
|
|
||||||
'buildPlugin',
|
|
||||||
]
|
|
||||||
|
Loading…
Reference in New Issue
Block a user