mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-18 03:37:44 +07:00
Testing Github Packages
This commit is contained in:
6
.github/workflows/deployment.yml
vendored
6
.github/workflows/deployment.yml
vendored
@ -11,12 +11,14 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Set up JDK 16
|
- name: Set up JDK 17
|
||||||
uses: actions/setup-java@v1
|
uses: actions/setup-java@v1
|
||||||
with:
|
with:
|
||||||
java-version: 16
|
java-version: 17
|
||||||
- name: Set env
|
- name: Set env
|
||||||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
||||||
|
- name: Publish package
|
||||||
|
run: ./gradlew clean publish -PpackageVersion=${RELEASE_VERSION}
|
||||||
- name: Add Arc release
|
- name: Add Arc release
|
||||||
run: |
|
run: |
|
||||||
git clone --depth=1 --branch=master https://github.com/Anuken/Arc ../Arc
|
git clone --depth=1 --branch=master https://github.com/Anuken/Arc ../Arc
|
||||||
|
2
.github/workflows/push.yml
vendored
2
.github/workflows/push.yml
vendored
@ -33,5 +33,7 @@ jobs:
|
|||||||
git commit -m "Automatic bundle update"
|
git commit -m "Automatic bundle update"
|
||||||
git push
|
git push
|
||||||
fi
|
fi
|
||||||
|
- name: Publish package
|
||||||
|
run: ./gradlew clean publish -PpackageVersion=${GITHUB_SHA}
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
run: ./gradlew clean cleanTest test --stacktrace
|
run: ./gradlew clean cleanTest test --stacktrace
|
||||||
|
19
build.gradle
19
build.gradle
@ -30,7 +30,7 @@ plugins{
|
|||||||
allprojects{
|
allprojects{
|
||||||
apply plugin: 'maven-publish'
|
apply plugin: 'maven-publish'
|
||||||
|
|
||||||
version = 'release'
|
version = project.hasProperty("packageVersion") ? project.getProperty("packageVersion") : 'release'
|
||||||
group = 'com.github.Anuken'
|
group = 'com.github.Anuken'
|
||||||
|
|
||||||
ext{
|
ext{
|
||||||
@ -461,16 +461,27 @@ project(":annotations"){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
configure([":core", ":desktop", ":server", ":tools"].collect{project(it)}){
|
configure([":core", ":server"].collect{project(it)}){
|
||||||
java{
|
java{
|
||||||
withJavadocJar()
|
withJavadocJar()
|
||||||
withSourcesJar()
|
withSourcesJar()
|
||||||
}
|
}
|
||||||
|
|
||||||
publishing{
|
publishing{
|
||||||
|
repositories{
|
||||||
|
maven{
|
||||||
|
name = "GitHubPackages"
|
||||||
|
url = uri("https://maven.pkg.github.com/anuken/mindustry")
|
||||||
|
credentials{
|
||||||
|
username = project.findProperty("gpr.user") ?: "Anuken"
|
||||||
|
password = project.findProperty("gpr.key") ?: System.getenv("PACKAGE_TOKEN")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
publications {
|
publications {
|
||||||
maven(MavenPublication){
|
gpr(MavenPublication) {
|
||||||
from components.java
|
from(components.java)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user