diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..bf24ee8 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,39 @@ +name: Release + +on: + release: + types: [published] + +jobs: + publish: + name: Release build and publish + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + ref: refs/remotes/origin/master + - name: set up JDK 1.11 + uses: actions/setup-java@v1 + with: + java-version: 1.11 + - name: Cache + uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + ~/.m2 + ~/.android/build-cache + key: ${GITHUB_REF##*/} + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Release build + run: ./gradlew displayVersion publishToSonatype closeAndReleaseSonatypeStagingRepository --max-workers 1 --no-daemon + env: + OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} + OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + SIGNING_KEY: ${{ secrets.SIGNING_KEY }} + SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} + SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} \ No newline at end of file