1.0.4 #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
# GitHub recommends pinning actions to a commit SHA. | |
# To get a newer version, you will need to update the SHA. | |
# You can also reference a tag or branch, but the action may change without warning. | |
name: Publish | |
on: | |
workflow_dispatch: | |
release: | |
# We'll run this workflow when a new GitHub release is created | |
types: [created] | |
jobs: | |
publish: | |
name: Release build and publish | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: adopt | |
java-version: 11 | |
- name: Validate Gradle wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Make gradlew executable | |
run: chmod +x ./gradlew | |
# Builds the release artifacts of the library | |
- name: Release build | |
run: ./gradlew assembleRelease -x :app:assembleRelease | |
# Generates other artifacts (javadocJar is optional) | |
- name: Source jar and dokka | |
run: ./gradlew androidSourcesJar javadocJar | |
# Runs upload, and then closes & releases the repository | |
- name: Publish to Mavel Central and GitHub Packages | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: publishReleasePublicationToGitHubPackagesRepository publishReleasePublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository --continue | |
env: | |
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | |
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} | |
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | |
SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | |
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} |