Skip to content

Commit

Permalink
Setup publish.yaml and publish-helper.gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
alfoirazabal committed Jan 24, 2024
1 parent 1772f50 commit c59c88b
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build & Publish

on:
# push:
# branches: [ master ]
workflow_dispatch:

env:
GPG_KEY: ${{ secrets.MAVEN_GPG_BUILDER_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_BUILDER_PASSPHRASE }}

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Setup Java
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'

- name: Build Release configuration
uses: gradle/[email protected]
with:
arguments: assembleRelease

- name: Publish to GitHub Packages
uses: gradle/[email protected]
with:
arguments: publishReleasePublicationToGitHubPackagesRepository
env:
USERNAME: $GITHUB_ACTOR
PASSWORD: ${{ secrets.GITHUB_TOKEN }}

- name: Publish to Maven Central
uses: gradle/[email protected]
with:
arguments: publishReleasePublicationToOSSRHRepository
env:
USERNAME: ${{ secrets.MAVEN_OSSRH_USERNAME }}
PASSWORD: ${{ secrets.MAVEN_OSSRH_TOKEN }}
9 changes: 9 additions & 0 deletions androidsvg/publisher-helper.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
task androidJavadocsJar(type: Jar) {
archiveClassifier.set('javadoc')
// from dokkaJavadoc.outputDirectory
}

task androidSourcesJar(type: Jar) {
archiveClassifier.set('sources')
// from android.sourceSets.main.java.srcDirs
}

0 comments on commit c59c88b

Please sign in to comment.