Merge pull request #46 from nicbell/dependabot/gradle/io.mockk-mockk-β¦ #60
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
# Publish a snapshot every time something is merged into 'main' | |
# Publish an official release on every tag | |
name: Android CI publish | |
on: | |
push: | |
branches: [ "main" ] | |
tags: | |
- '*' | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Publish with Gradle | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} | |
SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | |
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | |
run: ./gradlew assembleRelease publishReleasePublicationToGitHubPackagesRepository -c settings.gradle | |
# To publish to Sonatype | |
# ./gradlew publishReleasePublicationToSnapshotRepository | |
# ./gradlew publishReleasePublicationToStagingRepository |