Skip to content

Commit

Permalink
Merge pull request #3 from radixdlt/DO-1108-github-publish-workflow
Browse files Browse the repository at this point in the history
[DO-1108] Add Github workflow for publishing maven pkg
  • Loading branch information
marek-karwacki-rdx authored Jan 11, 2023
2 parents 982d278 + 841068b commit 63a379c
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 3 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Publish package to GitHub Packages
on:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'adopt'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Publish package
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
with:
arguments: publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26 changes: 23 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ plugins {
kotlin("jvm") version "1.7.20"
kotlin("plugin.serialization") version "1.7.20"

`maven-publish`
application
}

group = "com.radixdlt"
version = "1.0-SNAPSHOT"


version = "1.0-snapshot"

repositories {
mavenCentral()
Expand All @@ -36,3 +35,24 @@ tasks.withType<KotlinCompile> {
application {
mainClass.set("MainKt")
}

publishing {
publications {
create<MavenPublication>("mavenJava") {
groupId = project.group.toString()
artifactId = "slip10-android"
version = project.version.toString()
from(components["java"])
}
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/radixdlt/slip10-android")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}

0 comments on commit 63a379c

Please sign in to comment.