Skip to content

Commit

Permalink
ci: release please second attempt (#62)
Browse files Browse the repository at this point in the history
* feat: create release please manifest and config file and ci workflow (#59)

* ci: release version in manifest and drop defined token

---------

Co-authored-by: vahidlazio <vahidlazio@gmail.com>
  • Loading branch information
nicklasl and vahidlazio authored Sep 6, 2023
1 parent fcd27d4 commit 792c335
Show file tree
Hide file tree
Showing 4 changed files with 139 additions and 54 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
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
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.

1 change: 1 addition & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ ".": "0.1.0" }
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"
}

0 comments on commit 792c335

Please sign in to comment.