Skip to content

Commit

Permalink
test: Add published package tests to nightly build workflow (#10403)
Browse files Browse the repository at this point in the history
chore: add nightly build package tests
  • Loading branch information
filzrev authored Nov 20, 2024
1 parent 5dce25b commit fd536f3
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: nightly
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'

Expand Down Expand Up @@ -40,3 +41,44 @@ jobs:
run: |
dotnet nuget push drop/nuget/*.nupkg --api-key "${{ secrets.GITHUB_TOKEN }}" --skip-duplicate --source https://nuget.pkg.github.com/dotnet/index.json
test-nightly-package:
if: github.repository == 'dotnet/docfx'
runs-on: ubuntu-latest
needs: [publish-github-packages]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:

- name: Checkout
uses: actions/checkout@v4

- name: Create NuGet.config
shell: pwsh
run: |
@'
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="github" value="https://nuget.pkg.github.com/dotnet/index.json" />
</packageSources>
<packageSourceCredentials>
<github>
<add key="Username" value="%USER%" />
<add key="ClearTextPassword" value="%GITHUB_TOKEN%" />
</github>
</packageSourceCredentials>
</configuration>
'@ | Out-File NuGet.config -Encoding UTF8
- name: Install nightly build package
run: |
dotnet tool install docfx -g --prerelease
- name: Run docfx commands for test
working-directory: samples/seed
run: |
docfx metadata
docfx build
docfx pdf

0 comments on commit fd536f3

Please sign in to comment.