Skip to content

Commit

Permalink
Release library
Browse files Browse the repository at this point in the history
  • Loading branch information
zhelenskiy committed Apr 27, 2024
1 parent bb7a1b1 commit e38d145
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 2 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release

on:
push:
paths-ignore:
- '**.md'
branches:
- 'master'

jobs:
build:

runs-on: macos-latest

permissions:
contents: read
packages: write

steps:
- name: checkout
uses: actions/checkout@v2

- name: setup JDK 17
uses: actions/setup-java@v1
with:
java-version: 17

- name: Build
run: ./gradlew :assemble --stacktrace

- name: Check
run: ./gradlew :check

- name: Release library
run: ./gradlew :publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16 changes: 14 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

group = "org.example"
version = "1.0-SNAPSHOT"
group = "com.zhelenskiy"
version = "1.0"

fun generateClassSerializers() = buildString {
operator fun String.unaryPlus() = appendLine(this)
Expand Down Expand Up @@ -136,3 +136,15 @@ tasks.register("generateClassSerializers") {
tasks.withType<KotlinCompile> {
dependsOn(":generateClassSerializers")
}

publishing {
repositories {
maven {
url = uri("https://maven.pkg.github.com/zhelenskiy/kotlinx-serialization-builder")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}

0 comments on commit e38d145

Please sign in to comment.