Skip to content

docs: add develop hook section #49

docs: add develop hook section

docs: add develop hook section #49

on:
push:
branches:
- main
name: Run Release Please
jobs:
release-please:
runs-on: ubuntu-latest
# Release-please creates a PR that tracks all changes
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: simple
command: manifest
token: ${{secrets.GITHUB_TOKEN}}
default-branch: main
- name: Dump Release Please Output
env:
RELEASE_PLEASE_OUTPUT: ${{ toJson(steps.release.outputs) }}
run: |
echo "$RELEASE_PLEASE_OUTPUT"
# Outputs are namespaced by package when using a manifest in Release Please
outputs:
release_created: ${{ steps.release.outputs['OpenFeature--release_created'] }}
# Version doesn't include `v` as a prefix. This is undocumented
version: ${{ steps.release.outputs['OpenFeature--version'] }}
upload_url: ${{ steps.release.outputs['OpenFeature--upload_url'] }}
kotlin-release:
needs: release-please
runs-on: ubuntu-latest
if: ${{ needs.release-please.outputs.release_created }}
steps:
# The logic below handles the github release:
- name: Cache Gradle and wrapper
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
- name: Grant Permission for Gradlew to Execute
run: chmod +x gradlew
- name: Build AAR ⚙️🛠
env:
OF_KOTLIN_RELEASE_VERSION: ${{ needs.release-please.outputs.version }}
run: bash ./gradlew :openfeature:assemble
- name: Upload Openfeature SDK AAR 🗳
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release-please.outputs.upload_url }}
asset_path: OpenFeature/build/outputs/aar/OpenFeature-release.aar
asset_name: openfeature-sdk.aar
asset_content_type: application/aar