Skip to content

Commit

Permalink
🚀 Deploy to repo.azisaba.net
Browse files Browse the repository at this point in the history
  • Loading branch information
acrylic-style committed Jan 2, 2023
1 parent cde2728 commit 854c8d9
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Deploy

on:
workflow_dispatch:
push:
paths-ignore:
- "**.md"
- "renovate.json"

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Prepare gradle.properties
run: |
mkdir -p $HOME/.gradle
echo "repoUsername=${{ secrets.REPO_USERNAME }}" >> $HOME/.gradle/gradle.properties
echo "repoPassword=${{ secrets.REPO_PASSWORD }}" >> $HOME/.gradle/gradle.properties
- name: Deploy
run: ./gradlew clean publish
13 changes: 13 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,19 @@ allprojects {
}

publishing {
repositories {
maven {
name = "repo"
credentials(PasswordCredentials::class)
url = uri(
if (project.version.toString().endsWith("SNAPSHOT"))
project.findProperty("deploySnapshotURL") ?: System.getProperty("deploySnapshotURL", "https://repo.azisaba.net/repository/maven-snapshots/")
else
project.findProperty("deployReleasesURL") ?: System.getProperty("deployReleasesURL", "https://repo.azisaba.net/repository/maven-releases/")
)
}
}

publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
Expand Down

0 comments on commit 854c8d9

Please sign in to comment.