Skip to content

Support publishing through Github Actions #1

Support publishing through Github Actions

Support publishing through Github Actions #1

name: Publish Snapshot
on:
workflow_dispatch:
push:
branches:
- main
# TODO
pull_request:
jobs:
publish-snapshot:
runs-on: macos-latest
if: github.repository == 'amzn/kotlin-inject-anvil'
timeout-minutes: 25
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
- uses: gradle/actions/setup-gradle@v4
- name: Publish Snapshot
run: ./gradlew clean publish --no-build-cache --no-daemon --stacktrace --show-version
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ARTIFACT_SIGNING_PRIVATE_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.ARTIFACT_SIGNING_PRIVATE_KEY_PASSWORD }}