Skip to content

Commit

Permalink
Publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
Duzhinsky committed Aug 31, 2023
1 parent 2f7e88c commit 4c4e08e
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 2 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/publish-gh.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Publish to GitHub packages

on: [release]

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
- name: Publish gradle
run: ./gradlew publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25 changes: 23 additions & 2 deletions options/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,28 @@
@Suppress("DSL_SCOPE_VIOLATION") // Remove once KTIJ-19369 is fixed // to remove IDEA error on alias
plugins {
java
id("com.google.protobuf") version "0.9.1"
`maven-publish`
}

publishing {
publications {
create<MavenPublication>("maven") {
groupId = "org.sudu"
artifactId = "javapoet"
version = project.version.toString()

from(components["java"])
}
}
repositories {
maven {
name = "ghPackages"
url = uri("https://maven.pkg.github.com/SuduIDE/protogen")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}

repositories {
Expand Down

0 comments on commit 4c4e08e

Please sign in to comment.