Skip to content

Commit

Permalink
Add publishing workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ajalt committed Nov 1, 2020
1 parent 7edcc0b commit 2b73f5c
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 2 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/gradle-wrapper-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: "Validate Gradle Wrapper"
on:
push:
paths:
- 'gradle/**'
pull_request:
paths:
- 'gradle/**'
jobs:
validation:
name: "Validation"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: gradle/wrapper-validation-action@v1
37 changes: 37 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish

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

jobs:
linux-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: eskatos/gradle-command-action@v1
with:
dependencies-cache-enabled: true
arguments: check --stacktrace

deploy-linux:
needs: [ linux-tests ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Fetch git tags
run: git fetch origin +refs/tags/*:refs/tags/*
- name: Deploy to sonatype
uses: eskatos/gradle-command-action@v1
with:
dependencies-cache-enabled: true
arguments: :mordant:publish -PinferVersion=true

env:
GRADLE_OPTS: -Dorg.gradle.configureondemand=true -Dorg.gradle.parallel=true -Dkotlin.incremental=false -Dorg.gradle.project.kotlin.incremental.multiplatform=false -Dorg.gradle.project.kotlin.native.disableCompilerDaemon=true -Dorg.gradle.jvmargs="-Xmx5g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"
ORG_GRADLE_PROJECT_SONATYPE_USERNAME: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_SONATYPE_PASSWORD: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_signingKey }}
3 changes: 1 addition & 2 deletions mordant/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ val SONATYPE_PASSWORD: String? by project
publishing {
publications.withType<MavenPublication>().all {
pom {
description.set("Text formatting for Kotlin command line applications")
description.set("Colorful multiplatform styling Kotlin for command-line applications")
name.set("Mordant")
url.set("https://github.com/ajalt/mordant")
scm {
Expand Down Expand Up @@ -105,7 +105,6 @@ signing {
isRequired = !isSnapshot

if (signingKey != null && !isSnapshot) {
@Suppress("UnstableApiUsage")
useInMemoryPgpKeys(signingKey, "")
sign(publishing.publications)
}
Expand Down

0 comments on commit 2b73f5c

Please sign in to comment.