8000 release v4.1.0 by topi314 · Pull Request #1130 · lavalink-devs/Lavalink · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

release v4.1.0 #1130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 14 commits into
base: master
Choos 8000 e a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
156 changes: 84 additions & 72 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,41 +10,30 @@ on:
- '.github/workflows/docs-pr.yml'
workflow_call:
secrets:
DOCKER_REGISTRY:
required: false
DOCKER_USERNAME:
required: false
DOCKER_TOKEN:
required: false
DOCKER_REGISTRY:
required: false
DOCKER_IMAGE:
required: false
MAVEN_USERNAME:
required: false
MAVEN_PASSWORD:
required: false
ORG_GRADLE_PROJECT_mavenCentralPassword:
MAVEN_CENTRAL_USERNAME:
required: false
ORG_GRADLE_PROJECT_mavenCentralUsername:
MAVEN_CENTRAL_PASSWORD:
required: false
ORG_GRADLE_PROJECT_signingInMemoryKey:
SIGNING_IN_MEMORY_KEY:
required: false
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword:
SIGNING_IN_MEMORY_KEY_PASSWORD:
required: false

jobs:
build:
runs-on: ubuntu-latest
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY }}
DOCKER_IMAGE: ${{ secrets.DOCKER_IMAGE }}
MAVEN_USERNAME: ${{ vars.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALPASSWORD }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALUSERNAME }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEYPASSWORD }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -56,56 +45,67 @@ jobs:
java-version: 17

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4

- name: Execute Gradle build
- name: Build Lavalink
run: ./gradlew build

- name: Execute Gradle build
- name: Build Lavalink musl
run: ./gradlew build -PtargetPlatform=musl

- name: Publish to Maven
run: ./gradlew publish -PMAVEN_USERNAME=$MAVEN_USERNAME -PMAVEN_PASSWORD=$MAVEN_PASSWORD

- name: Upload Artifacts
env:
ORG_GRADLE_PROJECT_MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
ORG_GRADLE_PROJECT_MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_IN_MEMORY_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_IN_MEMORY_KEY_PASSWORD }}
run: ./gradlew publish

- name: Upload Lavalink.jar
uses: actions/upload-artifact@v4
with:
name: Lavalink.jar
path: |
LavalinkServer/build/libs/Lavalink.jar
LavalinkServer/build/libs/Lavalink-musl.jar
path: LavalinkServer/build/libs/Lavalink.jar

- name: Docker Meta
id: meta
uses: docker/metadata-action@v5
- name: Upload Lavalink-musl.jar
uses: actions/upload-artifact@v4
with:
images: |
ghcr.io/${{ github.repository }}
${{ env.DOCKER_IMAGE }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha,prefix=
name: Lavalink-musl.jar
path: LavalinkServer/build/libs/Lavalink-musl.jar

- name: Docker Meta Alpine
id: meta-alpine
uses: docker/metadata-action@v5
build-docker:
needs: build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: Ubuntu
dockerfile: LavalinkServer/docker/Dockerfile
suffix: ''
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8
artifact: Lavalink.jar
- name: Alpine
dockerfile: LavalinkServer/docker/alpine.Dockerfile
suffix: '-alpine'
platforms: linux/amd64,linux/arm64/v8
artifact: Lavalink-musl.jar
- name: Distroless
dockerfile: LavalinkServer/docker/distroless.Dockerfile
suffix: '-distroless'
platforms: linux/amd64,linux/arm64/v8
artifact: Lavalink.jar
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Download ${{ matrix.artifact }}
uses: actions/download-artifact@v4
with:
images: |
ghcr.io/${{ github.repository }}
${{ env.DOCKER_IMAGE }}
flavor: |
suffix=-alpine,>
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha,prefix=
name: ${{ matrix.artifact }}
path: LavalinkServer/build/libs/

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand All @@ -121,29 +121,41 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Log in to docker registry
if: env.DOCKER_USERNAME && env.DOCKER_TOKEN && env.DOCKER_REGISTRY && env.DOCKER_IMAGE
env:
DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
DOCKER_IMAGE: ${{ secrets.DOCKER_IMAGE }}
if: env.DOCKER_REGISTRY != '' && env.DOCKER_USERNAME != '' && env.DOCKER_TOKEN != '' && env.DOCKER_IMAGE != ''
uses: docker/login-action@v3
with:
registry: ${{ env.DOCKER_REGISTRY }}
username: ${{ env.DOCKER_USERNAME }}
password: ${{ env.DOCKER_TOKEN }}
registry: ${{ secrets.DOCKER_REGISTRY }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Build Ubuntu and Push
uses: docker/build-push-action@v5
- name: Docker Meta ${{ matrix.name }}
id: meta
uses: docker/metadata-action@v5
with:
file: LavalinkServer/docker/Dockerfile
context: .
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
images: |
ghcr.io/${{ github.repository }}
${{ secrets.DOCKER_IMAGE }}
flavor: |
suffix=${{ matrix.suffix }},>
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha,prefix=

- name: Build Alpine and Push
uses: docker/build-push-action@v5
- name: Docker Build ${{ matrix.name }} and Push
uses: docker/build-push-action@v6
with:
file: LavalinkServer/docker/alpine.Dockerfile
file: ${{ matrix.dockerfile }}
context: .
platforms: linux/amd64,linux/arm64/v8
platforms: ${{ matrix.platforms }}
push: true
tags: ${{ steps.meta-alpine.outputs.tags }}
labels: ${{ steps.meta-alpine.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
49 changes: 0 additions & 49 deletions .github/workflows/docs-pr.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:
- '.github/workflows/docs.yml'

concurrency:
group: pages-${{ github.ref }}
cancel-in-progress: true
group: pages-${{ github.ref }}
cancel-in-progress: true

jobs:
deploy:
Expand All @@ -33,7 +33,7 @@ jobs:
mkdocs-material-
- run: pip install -r requirements.txt
working-directory: docs
# - run: mkdocs build --verbose --strict
# - run: mkdocs build --verbose --strict
- run: mkdocs build --verbose
working-directory: docs
- uses: actions/upload-pages-artifact@v3
Expand Down
21 changes: 13 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release

on:
release:
types: [published]
types: [ published ]

jobs:
build:
Expand All @@ -12,12 +12,12 @@ jobs:
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY }}
DOCKER_IMAGE: ${{ secrets.DOCKER_IMAGE }}
MAVEN_USERNAME: ${{ vars.MAVEN_USERNAME }}
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALPASSWORD }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALUSERNAME }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEYPASSWORD }}
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
SIGNING_IN_MEMORY_KEY: ${{ secrets.SIGNING_IN_MEMORY_KEY }}
SIGNING_IN_MEMORY_KEY_PASSWORD: ${{ secrets.SIGNING_IN_MEMORY_KEY_PASSWORD }}

release:
needs: build
Expand All @@ -26,15 +26,20 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Download Artifacts
- name: Download Lavalink.jar
uses: actions/download-artifact@v4
with:
name: Lavalink.jar

- name: Download Lavalink-musl.jar
uses: actions/download-artifact@v4
with:
name: Lavalink-musl.jar

- name: Upload Artifacts to GitHub Release
uses: ncipollo/release-action@v1
with:
artifacts: Lavalink.jar
artifacts: Lavalink.jar,Lavalink-musl.jar
allowUpdates: true
omitBodyDuringUpdate: true
omitDraftDuringUpdate: true
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ build/*
/plugin-api/out/
/protocol/build/
/protocol/out/
gradle.properties
application.yml
LavalinkServer/plugins
.cache/
Expand Down
4 changes: 4 additions & 0 deletions LavalinkServer/application.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ lavalink:
#proxyPort: 3128 # Proxy port, 3128 is the default for squidProxy
#proxyUser: "" # Optional user for basic authentication fields, leave blank if you don't use basic auth
#proxyPassword: "" # Password for basic authentication
timeouts:
connectTimeoutMs: 3000
connectionRequestTimeoutMs: 3000
socketTimeoutMs: 3000

metrics:
prometheus:
Expand Down
13 changes: 13 additions & 0 deletions LavalinkServer/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ plugins {
application
kotlin("jvm")
id("org.jetbrains.dokka")
kotlin("plugin.serialization")
alias(libs.plugins.maven.publish.base)
}

Expand All @@ -30,6 +31,15 @@ java {
sourceCompatibility = JavaVersion.VERSION_17
}

kotlin {
sourceSets {
all {
languageSettings.optIn("kotlinx.serialization.ExperimentalSerializationApi")
languageSettings.optIn("nl.adaptivity.xmlutil.ExperimentalXmlUtilApi")
}
}
}

configurations {
compileOnly {
extendsFrom(annotationProcessor.get())
Expand All @@ -42,6 +52,9 @@ dependencies {
exclude(group = "org.springframework.boot", module = "spring-boot-starter-tomcat")
}

implementation(libs.xmlutil.jdk)
implementation(libs.xmlutil.serialization)

implementation(libs.bundles.metrics)
implementation(libs.bundles.spring) {
exclude(group = "org.springframework.boot", module = "spring-boot-starter-tomcat")
Expand Down
2 changes: 1 addition & 1 deletion LavalinkServer/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ USER lavalink

COPY LavalinkServer/build/libs/Lavalink.jar Lavalink.jar

ENTRYPOINT ["java", "-Djdk.tls.client.protocols=TLSv1.1,TLSv1.2", "-jar", "Lavalink.jar"]
ENTRYPOINT ["java", "-jar", "Lavalink.jar"]
Loading
Loading
0