Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

ci: adds release please support #80

Merged
merged 2 commits into from
Feb 13, 2024
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
2 changes: 1 addition & 1 deletion .github/actions/publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ runs:
for pkg in $(find ./nupkgs -name '*.nupkg' -o -name '*.snupkg'); do
echo "publishing ${pkg}"
dotnet nuget push "${pkg}" -ApiKey ${{ env.NUGET_API_KEY }} -Source https://www.nuget.org
echo "published $pkg"
echo "published ${pkg}"
done
14 changes: 13 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,19 @@ on:
run_tests:
description: 'If true, run unit tests, otherwise skip them.'
required: false
default: 'true'
type: boolean
default: true
dry_run:
description: 'Is this a dry run. If so no package will be published.'
type: boolean
required: true
workflow_call:
inputs:
run_tests:
description: 'If true, run unit tests, otherwise skip them.'
required: false
type: boolean
default: true
dry_run:
description: 'Is this a dry run. If so no package will be published.'
type: boolean
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release Please
on:
push:
branches:
- main

jobs:
release-please:
runs-on: ubuntu-latest

permissions:
id-token: write # Needed if using OIDC to get release secrets.
contents: write # Contents and pull-requests are for release-please to make releases.
pull-requests: write

outputs:
releases_created: ${{ steps.release.outputs.releases_created }}

steps:
- uses: google-github-actions/release-please-action@v4
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
target-branch: ${{ github.ref_name }}

call-workflow-publish:
needs: release-please
uses: ./.github/workflows/publish.yml
if: ${{ needs.release-please.outputs.releases_created == 'true' }}
with:
run_tests: true
dry_run: false
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "4.0.0"
}
15 changes: 15 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"bootstrap-sha": "ffc2e94144f2a4ddfd5f42e09c228713d4510fd6",
"packages": {
".": {
"release-type": "simple",
"bump-minor-pre-major": true,
"versioning": "default",
"include-v-in-tag": false,
"include-component-in-tag": false,
"extra-files": [
"src/LaunchDarkly.ClientSdk/LaunchDarkly.ClientSdk.csproj"
]
}
}
}
2 changes: 2 additions & 0 deletions src/LaunchDarkly.ClientSdk/LaunchDarkly.ClientSdk.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<!--x-release-please-start-version-->
<Version>5.0.0-alpha.2</Version>
<!--x-release-please-end-->
<!-- The BUILDFRAMEWORKS variable allows us to override the target frameworks in
a situation where we need to build only the .NET Standard target and do not
want to even mention the Android/iOS/Mac/Windows targets, because we're in an environment
Expand Down
Loading