Skip to content

Commit

Permalink
Test Maven publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
embeddedt committed Aug 27, 2024
1 parent 4ff8023 commit 0d0feb9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ name: build-snapshot

on: [ push ]

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

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -22,7 +26,7 @@ jobs:
distribution: 'temurin'
java-version: 17
- name: Build artifacts
run: ./gradlew build
run: ./gradlew build publish -PtaumcRepositoryUsername="$USERNAME" -PtaumcRepositoryPassword="$PASSWORD"
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
Expand Down
12 changes: 11 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,14 @@ publishing {
from components.java
}
}
}
repositories {
maven {
name = "taumcRepository"
url = uri("https://maven.taumc.org/releases")
credentials(PasswordCredentials)
authentication {
basic(BasicAuthentication)
}
}
}
}

0 comments on commit 0d0feb9

Please sign in to comment.