Skip to content

Fix publishing (#21) #74

Fix publishing (#21)

Fix publishing (#21) #74

Workflow file for this run

# This workflow will build a package using Gradle and then publish it to maven
name: Kotlin CI
on:
push:
branches:
- '**' # We want to run this on all branch pushes
tags-ignore:
- '**' # We don't want this to run on tags pushes
pull_request:
release:
types: [ published ]
jobs:
build:
name: Build Kord
runs-on: ubuntu-latest
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
- name: Build with gradle
uses: gradle/gradle-build-action@v2
with:
arguments: build javadocJar --stacktrace --info
release:
name: Publish artifacts
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
needs: build
env:
NEXUS_USER: ${{ secrets.NEXUS_USER }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.signingKey }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.signingPassword }}
GITHUB_EVENT_NAME: ${{ github.event_name }}
GITHUB_TAG_NAME: ${{ github.event.release.tag_name }}
GITHUB_TARGET_COMMITISH: ${{ github.event.release.target_commitish }}
GITHUB_BRANCH_NAME: ${{ github.ref }}
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
- name: Build with gradle
uses: gradle/gradle-build-action@v2
with:
arguments: --stacktrace --info build
- name: Publish with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: -x test publish
# Disabled for now
#
# - name: Close and Release Repository
# run: ./gradlew closeAndReleaseRepository