|
| 1 | +name: Publish Git-Dev |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - v4 |
| 7 | + |
| 8 | +jobs: |
| 9 | + nuget: |
| 10 | + name: nuget |
| 11 | + runs-on: windows-latest |
| 12 | + steps: |
| 13 | + - name: Checkout Code |
| 14 | + uses: actions/checkout@v4 |
| 15 | + |
| 16 | + - name: Setup .NET |
| 17 | + uses: actions/setup-dotnet@v4 |
| 18 | + with: |
| 19 | + dotnet-version: | |
| 20 | + 7.0.x |
| 21 | + 5.0.x |
| 22 | +
|
| 23 | + - name: Restore Dependencies |
| 24 | + run: dotnet restore |
| 25 | + |
| 26 | + - name: Generate Coverage Report |
| 27 | + run: dotnet test # coverage happens by default |
| 28 | + |
| 29 | + - name: Upload Coverage Report |
| 30 | + uses: actions/upload-artifact@v4 |
| 31 | + with: |
| 32 | + name: report |
| 33 | + path: docfx/coverage/report/ |
| 34 | + |
| 35 | + - name: Pack |
| 36 | + run: | |
| 37 | + mkdir pkgs |
| 38 | + dotnet pack --no-restore -c Release -p:PackageVersion=git-dev -o ./pkgs |
| 39 | + |
| 40 | +# - name: Prep Packages |
| 41 | +# run: dotnet nuget add source --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/BloodHoundAD/index.json" |
| 42 | + |
| 43 | +# - name: Publish to GitHub Packages |
| 44 | +# run: dotnet nuget push *.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source "github" |
| 45 | +# |
| 46 | +# - name: Publish NuGet |
| 47 | +# run: dotnet nuget push *.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_TOKEN }} --skip-duplicate |
| 48 | + |
| 49 | + - name: Publish to SpecterOps Packages |
| 50 | + env: |
| 51 | + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }} |
| 52 | + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_KEY }} |
| 53 | + run: | |
| 54 | + dotnet tool install -g sleet |
| 55 | + sleet push ./pkgs |
| 56 | + |
| 57 | + ghpages: |
| 58 | + name: ghpages |
| 59 | + needs: nuget |
| 60 | + runs-on: ubuntu-latest |
| 61 | + steps: |
| 62 | + - name: Checkout Code |
| 63 | + uses: actions/checkout@v4 |
| 64 | + |
| 65 | + - name: Download Coverage Report |
| 66 | + uses: actions/download-artifact@v4 |
| 67 | + with: |
| 68 | + name: report |
| 69 | + path: docfx/coverage/report |
| 70 | + |
| 71 | + - name: Build Documentation |
| 72 | + uses: nikeee/docfx-action@v1.0.0 |
| 73 | + with: |
| 74 | + args: docfx/docfx.json |
| 75 | + |
| 76 | + - name: Deploy GitHub Pages |
| 77 | + uses: JamesIves/github-pages-deploy-action@4.1.4 |
| 78 | + with: |
| 79 | + branch: gh-pages |
| 80 | + folder: docs |
0 commit comments