Skip to content

Commit

Permalink
Add missing publish action.yml. Remove gitignore for publish.
Browse files Browse the repository at this point in the history
  • Loading branch information
kinyoklion committed Feb 21, 2024
1 parent d24ffb3 commit 0f1896a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
25 changes: 25 additions & 0 deletions .github/actions/publish/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish
description: 'Dotnet Logging Adapter NLog 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.'
required: true

runs:
using: composite
steps:
- name: Create Nuget Package
shell: bash
run: |
dotnet restore
dotnet pack --no-build --output nupkgs --configuration Release src/LaunchDarkly.Logging.NLog/LaunchDarkly.Logging.NLog.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
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish

# Others
[Bb]in
[Oo]bj
Expand Down

0 comments on commit 0f1896a

Please sign in to comment.