Skip to content
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
13 changes: 10 additions & 3 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ on:
- master
env:
APP_NAME: DanishCvr
VERSION: 1.0.0
VERSION: 1.0.1
NUGET_HOST: https://api.nuget.org/v3/index.json
NUGET_APIKEY: ${{ secrets.NUGET_APIKEY }}
jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
concurrency:
group: ${{ github.repository }}
cancel-in-progress: true
Expand All @@ -37,11 +37,18 @@ jobs:
throw "Pack failed";
};

- name: NuGet Login (Trusted Publishing)
if: github.ref == 'refs/heads/master'
id: nuget-login
uses: NuGet/login@8d196754b4036150537f80ac539e15c2f1028841 # v1.2.0
with:
user: vivet

- name: Push NuGet
if: github.ref == 'refs/heads/master'
shell: pwsh
run: |
dotnet nuget push "nupkgs/*.nupkg" -s $env:NUGET_HOST -k $env:NUGET_APIKEY --skip-duplicate
dotnet nuget push "nupkgs/*.nupkg" -s $env:NUGET_HOST -k ${{ steps.nuget-login.outputs.NUGET_API_KEY }} --skip-duplicate

if ($LastExitCode -ne 0)
{
Expand Down
2 changes: 1 addition & 1 deletion DanishCvr/DanishCvr.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<Summary>Look up Danish companies, production units and persons in the Central Business Register (CVR).</Summary>
<Description>Search and retrieve company, production unit, person and relation information from the Danish Central Business Register (CVR), including status, business type, industry, employment, addresses and ownership. Includes a batch service for exporting the full register.</Description>
<PackageReleaseNotes>
- Initial Release
- Changed to Trusted publishing for NuGet
</PackageReleaseNotes>
<RepositoryType>Github</RepositoryType>
<RepositoryBranch>master</RepositoryBranch>
Expand Down
Loading