Skip to content

Commit

Permalink
Add pipeline job to publish library
Browse files Browse the repository at this point in the history
  • Loading branch information
Micha-ohne-el committed Nov 4, 2023
1 parent 514da5d commit f9b474e
Showing 1 changed file with 21 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
name: Deploy Dokka documentation to GitHub Pages
name: Deployment

on:
push:
branches: [ "main" ]
paths:
- '**.kt'
- '**.kts'
- '**/gradle.properties'
- '**/gradlew'
- '**/gradlew.bat'
- '.github/workflows/**'
release:
types:
- published

workflow_dispatch:

Expand All @@ -22,11 +16,12 @@ permissions:
# Make sure only one run is ever queued simultaneously to save resources.
# If a run is queued when one is already queued, the old one will get cancelled before it starts.
concurrency:
group: "documentation"
group: "deployment"
cancel-in-progress: false

jobs:
deploy:
documentation:
name: Deploy Dokka documentation to GitHub Pages
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand All @@ -49,3 +44,17 @@ jobs:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

library:
name: Deploy library to Maven Central
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_KEY_PASSWORD: ${{ secrets.GPG_KEY_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Publish artifacts to Maven Central
run: ./gradlew publish --info

0 comments on commit f9b474e

Please sign in to comment.