Skip to content

Commit

Permalink
added ci to deploy to maven repository
Browse files Browse the repository at this point in the history
  • Loading branch information
polischuks committed Oct 25, 2024
1 parent 814460c commit 3edb9d2
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish package to the Maven Repository

on:
release:
types: [created]
workflow_dispatch:

jobs:
publish:
runs-on: [ self-hosted, small ]
steps:
- uses: actions/checkout@v4

- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'corretto'

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

- name: Publish package
run: ./gradlew publish
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ publishing {
maven {
url "https://packages.jetbrains.team/maven/p/hyperskill-hs-test/maven"
credentials {
username = spaceUsername
password = spacePassword
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
}
Expand Down
2 changes: 0 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
spaceUsername=
spacePassword=

0 comments on commit 3edb9d2

Please sign in to comment.