add package uploading
This commit is contained in:
parent
1e982cd2ef
commit
6125772038
6
.github/workflows/tagged-release.yml
vendored
6
.github/workflows/tagged-release.yml
vendored
@ -25,10 +25,14 @@ jobs:
|
||||
gradle-version: "8.10"
|
||||
- name: Build
|
||||
run: gradle build
|
||||
- name: Publish
|
||||
run: gradle publish
|
||||
env:
|
||||
ACCESS_TOKEN: "${{github.token}}"
|
||||
REPO_URL: "${{github.api_url}}/packages/${{github.repository_owner}}/maven"
|
||||
- name: Create release
|
||||
uses: "https://gitea.com/actions/gitea-release-action@main"
|
||||
with:
|
||||
# api_key: "${{secrets.TOKEN}}"
|
||||
files: |
|
||||
LICENSE
|
||||
build/libs/*.jar
|
@ -9,4 +9,7 @@ java {
|
||||
toolchain {
|
||||
languageVersion = JavaLanguageVersion.of(17);
|
||||
}
|
||||
|
||||
withJavadocJar();
|
||||
withSourcesJar();
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
plugins {
|
||||
id("java");
|
||||
id("maven-publish");
|
||||
}
|
||||
|
||||
version = rootProject.version;
|
||||
@ -20,3 +21,27 @@ dependencies {
|
||||
testImplementation("org.junit.jupiter:junit-jupiter:5.9.2");
|
||||
testRuntimeOnly("org.junit.platform:junit-platform-launcher");
|
||||
}
|
||||
|
||||
|
||||
publishing {
|
||||
repositories {
|
||||
maven {
|
||||
name = "Gitea";
|
||||
url = uri(System.getenv("REPO_URL") ?: "");
|
||||
|
||||
credentials(HttpHeaderCredentials::class) {
|
||||
name = "Authorization";
|
||||
value = "token ${System.getenv("ACCESS_TOKEN")}";
|
||||
}
|
||||
|
||||
authentication {
|
||||
create<HttpHeaderAuthentication>("header");
|
||||
}
|
||||
}
|
||||
}
|
||||
publications {
|
||||
create<MavenPublication>("maven") {
|
||||
from(components["java"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ public final class FunctionScope {
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns If a variable with the same name exists, the old variable. Otherwise, the given variable
|
||||
* @return If a variable with the same name exists, the old variable. Otherwise, the given variable
|
||||
*/
|
||||
public Variable define(Variable var) {
|
||||
if (passthrough) return null;
|
||||
@ -48,7 +48,7 @@ public final class FunctionScope {
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns A variable with the given name, or null if a global variable
|
||||
* @return A variable with the given name, or null if a global variable
|
||||
*/
|
||||
public Variable define(String name) {
|
||||
return define(new Variable(name, false));
|
||||
|
@ -175,7 +175,7 @@ public final class VariableList implements Iterable<Variable> {
|
||||
this.offset = () -> offset;
|
||||
}
|
||||
/**
|
||||
* @param offset Will offset the indices by the size of the given list
|
||||
* @param prev Will offset the indices by the size of the given list
|
||||
*/
|
||||
public VariableList(IndexType type, VariableList prev) {
|
||||
this.indexType = type;
|
||||
|
@ -1,4 +1,4 @@
|
||||
project_group = me.topchetoeu
|
||||
project_group = me.topchetoeu.j2s
|
||||
project_name = j2s
|
||||
project_version = 0.10.5-beta
|
||||
main_class = me.topchetoeu.j2s.repl.SimpleRepl
|
||||
|
@ -31,8 +31,6 @@ public interface DebugHandler {
|
||||
* Called when a script has been loaded
|
||||
* @param filename The name of the source
|
||||
* @param source The name of the source
|
||||
* @param breakpoints A set of all the breakpointable locations in this source
|
||||
* @param map The source map associated with this file. null if this source map isn't mapped
|
||||
*/
|
||||
public void onSourceLoad(Filename filename, String source);
|
||||
|
||||
|
@ -429,7 +429,6 @@ public abstract class Value {
|
||||
}
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
public List<String> toReadableLines(Environment env, HashSet<ObjectValue> passed) {
|
||||
return Arrays.asList(toString(env));
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ plugins {
|
||||
id("org.gradle.toolchains.foojay-resolver-convention") version "0.7.0";
|
||||
}
|
||||
|
||||
// rootProject.name = properties.project_name;
|
||||
rootProject.name = extra.properties["project_name"].toString();
|
||||
|
||||
include(":lib");
|
||||
include(":common");
|
||||
|
Loading…
Reference in New Issue
Block a user