Skip to content

Commit

Permalink
Switch to centrally managed actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Smaug123 committed Aug 28, 2024
1 parent 6c782ff commit 5d1e265
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 58 deletions.
14 changes: 0 additions & 14 deletions .github/workflows/assert-contents.sh

This file was deleted.

30 changes: 10 additions & 20 deletions .github/workflows/dotnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ jobs:
needs: [check-dotnet-format, check-nix-format, build, build-nix, linkcheck, flake-check, nuget-pack, expected-pack, github-release-dry-run, build-windows]
runs-on: ubuntu-latest
steps:
- uses: Smaug123/all-required-checks-complete-action@05b40a8c47ef0b175ea326e9abb09802cb67b44e
- uses: G-Research/common-actions/check-required-lite@2b7dc49cb14f3344fbe6019c14a31165e258c059
with:
needs-context: ${{ toJSON(needs) }}

Expand Down Expand Up @@ -229,26 +229,16 @@ jobs:
with:
name: nuget-package
path: packed
- name: Publish to NuGet
id: publish-success
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: 'nix develop --command bash ./.github/workflows/nuget-push.sh "packed/WoofWare.DotnetRuntimeLocator.*.nupkg"'
- name: Wait for availability
if: steps.publish-success.outputs.result == 'published'
env:
PACKAGE_VERSION: ${{ steps.publish-success.outputs.version }}
run: 'echo "$PACKAGE_VERSION" && while ! curl -L --fail -o from-nuget.nupkg "https://www.nuget.org/api/v2/package/WoofWare.DotnetRuntimeLocator/$PACKAGE_VERSION" ; do sleep 10; done'
# Astonishingly, NuGet.org considers it to be "more secure" to tamper with my package after upload (https://devblogs.microsoft.com/nuget/introducing-repository-signatures/).
# So we have to *re-attest* it after it's uploaded. Mind-blowing.
- name: Assert package contents
if: steps.publish-success.outputs.result == 'published'
run: 'bash ./.github/workflows/assert-contents.sh'
- name: Attest Build Provenance
if: steps.publish-success.outputs.result == 'published'
uses: actions/attest-build-provenance@6149ea5740be74af77f260b9db67e633f6b0a9a1 # v1.4.2
- name: Identify .NET
id: identify-dotnet
run: nix develop --command bash -c "echo dotnet=$(which dotnet) >> $GITHUB_OUTPUT"
- name: Publish NuGet package
uses: G-Research/common-actions/publish-nuget@2b7dc49cb14f3344fbe6019c14a31165e258c059
with:
subject-path: "from-nuget.nupkg"
package-name: WoofWare.DotnetRuntimeLocator
nuget-key: ${{ secrets.NUGET_API_KEY }}
nupkg-dir: packed/
dotnet: ${{ steps.identify-dotnet.outputs.dotnet }}

github-release:
runs-on: ubuntu-latest
Expand Down
24 changes: 0 additions & 24 deletions .github/workflows/nuget-push.sh

This file was deleted.

0 comments on commit 5d1e265

Please sign in to comment.