Skip to content
Merged
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
12 changes: 11 additions & 1 deletion .github/workflows/publish_nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ jobs:
permissions:
contents: read
# NuGet/login exchanges this workflow's OIDC token for a short-lived
# nuget.org api key, so no push secret is stored in the repo.
# nuget.org api key, so no push secret is stored in the repo. The same token
# signs the build provenance below.
id-token: write
attestations: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
Expand Down Expand Up @@ -61,6 +63,14 @@ jobs:
dotnet pack csharp/PhoneNumbers.Extensions -c Release --no-restore \
-p:VersionPrefix="${VERSION}" -o artifacts

# Signed, verifiable provenance for what is about to be pushed: which workflow, at which
# commit, produced these exact bytes. Runs before the push so nothing is published without
# it. Verify with: gh attestation verify <file> --repo twcclegg/libphonenumber-csharp
- name: Attest package provenance
uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
with:
subject-path: 'artifacts/*.nupkg'

- name: Upload packages
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
Expand Down