-
Notifications
You must be signed in to change notification settings - Fork 1
ci: Configure Release-please #22
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
Open
bencehornak
wants to merge
3
commits into
main
Choose a base branch
from
release-please
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
name: Run Release Please | ||
jobs: | ||
release-please: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write # for googleapis/release-please-action to create release commit | ||
pull-requests: write # for googleapis/release-please-action to create release PR | ||
|
||
# Release-please creates a PR that tracks all changes | ||
steps: | ||
- uses: googleapis/release-please-action@a02a34c4d625f9be7cb89156071d8567266a2445 # v4 | ||
id: release | ||
with: | ||
token: ${{secrets.RELEASE_PLEASE_ACTION_TOKEN}} | ||
target-branch: main | ||
|
||
- name: Dump Release Please Output | ||
env: | ||
RELEASE_PLEASE_OUTPUT: ${{ toJson(steps.release.outputs) }} | ||
run: | | ||
echo "$RELEASE_PLEASE_OUTPUT" | ||
outputs: | ||
release_created: ${{ steps.release.outputs.releases_created }} | ||
all: ${{ toJSON(steps.release.outputs) }} | ||
paths_released: ${{ steps.release.outputs.paths_released }} | ||
|
||
kotlin-release: | ||
needs: release-please | ||
runs-on: ubuntu-latest | ||
if: ${{ fromJSON(needs.release-please.outputs.release_created || false) }} | ||
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: Configure GPG Key | ||
run: | | ||
echo -n "$GPG_SIGNING_KEY" | gpg --import | ||
gpg --pinentry-mode=loopback --export-secret-key 08C5EC5C > ~/.gnupg/secring.gpg | ||
env: | ||
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }} | ||
|
||
- name: Add signing secrets to gradle.properties | ||
run: | | ||
mkdir -p ~/.gradle/ | ||
echo "signing.keyId=08C5EC5C" >> ~/.gradle/gradle.properties | ||
echo "signing.secretKeyRingFile=/home/runner/.gnupg/secring.gpg" >> ~/.gradle/gradle.properties | ||
echo "signing.password=$GPG_SIGNING_KEY_PASSWORD" >> ~/.gradle/gradle.properties | ||
env: | ||
GPG_SIGNING_KEY_ID: ${{ secrets.GPG_SIGNING_KEY_ID }} | ||
GPG_SIGNING_KEY_PASSWORD: ${{ secrets.GPG_SIGNING_KEY_PASSWORD }} | ||
|
||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: 11 | ||
distribution: 'zulu' | ||
|
||
- name: Grant Permission for Gradlew to Execute | ||
run: chmod +x gradlew | ||
|
||
- name: Publish to Sonatype | ||
env: | ||
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | ||
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | ||
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository --no-daemon --stacktrace | ||
|
||
- name: Clean up signing secrets | ||
run: rm ~/.gradle/gradle.properties |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"providers/env-var": "0.1.0", | ||
"providers/ofrep": "0.1.0" | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,9 @@ plugins { | |
|
||
allprojects { | ||
extra["groupId"] = "dev.openfeature.kotlin.contrib" | ||
// x-release-please-start-version | ||
ext["version"] = "0.1.0" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can the versions be managed by each artifact? I've updated Release Please to support monorepos. |
||
// x-release-please-end | ||
} | ||
group = project.extra["groupId"].toString() | ||
version = project.extra["version"].toString() | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
{ | ||
"bootstrap-sha": "2c5c1d95344990ae45d2d26f30e8c4c45add67c2", | ||
"packages": { | ||
"providers/env-var": { | ||
"release-type": "simple", | ||
"bump-minor-pre-major": true, | ||
"bump-patch-for-minor-pre-major": true, | ||
"versioning": "default", | ||
"extra-files": [ | ||
"README.md", | ||
"build.gradle.kts" | ||
] | ||
}, | ||
"providers/ofrep": { | ||
"release-type": "simple", | ||
"bump-minor-pre-major": true, | ||
"bump-patch-for-minor-pre-major": true, | ||
"versioning": "default", | ||
"extra-files": [ | ||
"README.md", | ||
"build.gradle.kts" | ||
] | ||
} | ||
}, | ||
"changelog-sections": [ | ||
{ | ||
"type": "fix", | ||
"section": "🐛 Bug Fixes" | ||
}, | ||
{ | ||
"type": "feat", | ||
"section": "✨ New Features" | ||
}, | ||
bencehornak marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{ | ||
"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" | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're publishing artifacts individually, the release itself may need to be updated. Here's how we did it in the Python contribs. Perhaps we could do something similar here.