Skip to content

Commit

Permalink
ci: add publish.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
jarnedemeulemeester authored Feb 7, 2023
1 parent 977cb11 commit 0403925
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Publish

on:
push:
tags:
- v*
branches:
- master

jobs:
publish:
name: Publish
runs-on: ubuntu-22.04
environment: release
if: ${{ contains(github.repository_owner, 'jarnedemeulemeester') || startsWith(github.ref, 'refs/tags/v') }}
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Setup Java JDK
uses: actions/[email protected]
with:
distribution: temurin
java-version: 11
- name: Gradle Build Action
uses: gradle/[email protected]
- name: Symlink SDK
working-directory: ./buildscripts
run: |
mkdir sdk
ln -s ${ANDROID_HOME} ./sdk/android-sdk-linux
- name: Download dependencies
working-directory: ./buildscripts
run: ./download.sh
- name: Build
working-directory: ./buildscripts
run: ./build.sh
- name: Publish to MavenCentral
run: ./gradlew publishReleasePublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository
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 }}

0 comments on commit 0403925

Please sign in to comment.