Skip to content

Commit

Permalink
Publish Blacksmith to Maven
Browse files Browse the repository at this point in the history
  • Loading branch information
embeddedt committed Oct 25, 2024
1 parent 43c4f33 commit d8ef780
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/build-snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Used when a commit is pushed to the repository
name: build-snapshot

on:
push:
branches:
- main

env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_SECRET: ${{ secrets.MAVEN_SECRET }}

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
- name: Build artifacts
run: ./gradlew build publish
22 changes: 22 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id 'java-library'
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'maven-publish'
}

allprojects {
Expand Down Expand Up @@ -68,3 +69,24 @@ assemble.dependsOn shadowJar
shadowJar {
archiveClassifier.set('')
}

publishing {
publications {
shadow(MavenPublication) {
from components.shadow
}
}
repositories {
maven {
name = "taumcRepository"
url = uri("https://maven.taumc.org/releases")
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_SECRET")
}
authentication {
basic(BasicAuthentication)
}
}
}
}

0 comments on commit d8ef780

Please sign in to comment.