Skip to content

Commit 4d979fc

Browse files
authored
Merge pull request #25 from bonk-dev/chore/trusted-publishing
chore: add TrustedPublishing
2 parents d587055 + 0b4c72c commit 4d979fc

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

.github/workflows/dotnet.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,42 @@ jobs:
3434
run: dotnet pack HarpoS7/HarpoS7.csproj -c Release --output ./nupkg_output
3535
- name: Pack PublicKeys NuGet Package
3636
run: dotnet pack HarpoS7.PublicKeys/HarpoS7.PublicKeys.csproj -c Release --output ./nupkg_output
37+
- name: Pack HarpoS7.PoC (linux)
38+
run: dotnet publish HarpoS7.PoC/HarpoS7.PoC.csproj --sc -c Release -r linux-x64 -o linux -p:PublishSingleFile=true
39+
- name: Pack HarpoS7.PoC (windows)
40+
run: dotnet publish HarpoS7.PoC/HarpoS7.PoC.csproj --sc -c Release -r win-x64 -o windows -p:PublishSingleFile=true
3741
- name: Upload NuGet Package as Artifact
3842
uses: actions/upload-artifact@v7
3943
with:
4044
name: HarpoS7-NuGet-Packages
4145
path: ./nupkg_output/*.nupkg
46+
- name: Upload HarpoS7.Poc (linux)
47+
uses: actions/upload-artifact@v7
48+
with:
49+
name: HarpoS7.PoC_Linux_x64_SelfContained
50+
path: ./linux/*
51+
- name: Upload HarpoS7.Poc (windows)
52+
uses: actions/upload-artifact@v7
53+
with:
54+
name: HarpoS7.PoC_Windows_x64_SelfContained
55+
path: ./windows/*
56+
57+
publish-nuget:
58+
runs-on: ubuntu-latest
59+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
60+
environment: nuget-release
61+
needs: [build]
62+
permissions:
63+
id-token: write # enable GitHub OIDC token issuance for this job
64+
steps:
65+
- uses: actions/download-artifact@v7
66+
with:
67+
name: HarpoS7-NuGet-Packages
68+
path: ./artifacts
69+
- name: NuGet login
70+
uses: NuGet/login@v1
71+
id: login
72+
with:
73+
user: ${{ secrets.NUGET_USER }}
74+
- name: Publish to NuGet
75+
run: dotnet nuget push ./artifacts/*.nupkg --api-key ${{ steps.login.outputs.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate

0 commit comments

Comments
 (0)