Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: create release please manifest and config file and ci workflow #59

Merged
merged 1 commit into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
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.TOKEN_PUBLISH}}
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['Provider--release_created'] }}
# Version doesn't include `v` as a prefix. This is undocumented
version: ${{ steps.release.outputs['Provider--version'] }}
upload_url: ${{ steps.release.outputs['Provider--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@v3

- 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 :provider:assemble

- name: Upload Confidence Provider SDK AAR 🗳
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_PUBLISH }}
with:
upload_url: ${{ needs.release-please.outputs.upload_url }}
asset_path: Provider/build/outputs/aar/Provider-release.aar
asset_name: provider-sdk.aar
asset_content_type: application/aar
54 changes: 0 additions & 54 deletions .github/workflows/release.yaml

This file was deleted.

Empty file added .release-please-manifest.json
Empty file.
66 changes: 66 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"bootstrap-sha": "fe4d0c5e5553cf34a4089e52de5324370bb933dd",
"packages": {
"Provider": {
"release-type": "simple",
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
"versioning": "default"
}
},
"changelog-sections": [
{
"type": "fix",
"section": "🐛 Bug Fixes"
},
{
"type": "feat",
"section": "✨ New Features"
},
{
"type": "chore",
"section": "🧹 Chore"
},
{
"type": "docs",
"section": "📚 Documentation"
},
{
"type": "perf",
"section": "🚀 Performance"
},
{
"type": "build",
"hidden": true,
"section": "🛠️ Build"
},
{
"type": "deps",
"section": "📦 Dependencies"
},
{
"type": "ci",
"hidden": true,
"section": "🚦 CI"
},
{
"type": "refactor",
"section": "🔄 Refactoring"
},
{
"type": "revert",
"section": "🔙 Reverts"
},
{
"type": "style",
"hidden": true,
"section": "🎨 Styling"
},
{
"type": "test",
"hidden": true,
"section": "🧪 Tests"
}
],
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}
Loading