-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add github publish action. (#28)
The gitignore had an entry that caused this addition to be missed.
- Loading branch information
1 parent
cfac437
commit 3f48713
Showing
2 changed files
with
40 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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,39 @@ | ||
name: Publish | ||
description: 'Dotnet Client SDK action that packs DLLs into unsigned Nuget package and publishes to Nuget.' | ||
inputs: | ||
dry_run: | ||
description: 'Is this a dry run. If so no package will be published.' | ||
type: boolean | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Setup dotnet build tools | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 7.0 | ||
|
||
- name: Create Nuget Package | ||
shell: bash | ||
run: | | ||
dotnet restore | ||
dotnet pack --no-build --output nupkgs --configuration Release src/LaunchDarkly.OpenFeature.ServerProvider/LaunchDarkly.OpenFeature.ServerProvider.csproj | ||
- name: Publish Package | ||
if: ${{ inputs.dry_run == 'false' }} | ||
shell: bash | ||
run: | | ||
for pkg in $(find ./nupkgs -name '*.nupkg' -o -name '*.snupkg'); do | ||
echo "publishing ${pkg}" | ||
dotnet nuget push "${pkg}" --api-key ${{ env.NUGET_API_KEY }} --source https://www.nuget.org | ||
echo "published ${pkg}" | ||
done | ||
- name: Publish Package Dry-Run | ||
if: ${{ inputs.dry_run == 'true' }} | ||
shell: bash | ||
run: | | ||
for pkg in $(find ./nupkgs -name '*.nupkg' -o -name '*.snupkg'); do | ||
echo "dry run - ${pkg}" | ||
done |
This file contains 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