Skip to content

nuget

nuget #9

Workflow file for this run

name: nuget
on:
workflow_dispatch:
inputs:
global:
type: choice
description: Collect General Stats
required: true
options:
- $true
- $false
owner:
description: Collect Specific Owner Stats
schedule:
- cron: "0 2 1-7 * 6"
jobs:
nuget:
runs-on: ubuntu-latest
steps:
- name: πŸ€– defaults
uses: devlooped/actions-bot@v1
with:
name: ${{ secrets.BOT_NAME }}
email: ${{ secrets.BOT_EMAIL }}
gh_token: ${{ secrets.GH_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: 🀘 checkout
uses: actions/checkout@v4
with:
token: ${{ env.GH_TOKEN }}
- name: βš™ sponsors
shell: pwsh
run: |
dotnet tool update -g dotnet-sponsor
$owners = gc owners.json | convertfrom-json
if ('${{ github.event.inputs.owner }}') {
$owners = @('${{ github.event.inputs.owner }}')
}
foreach ($owner in $owners) {
'${{ secrets.DEVLOOPED_TOKEN }}' | sponsor nuget --tos --exceptions --oss-only false --with-token --force --owner $owner
}
# global stats for all packages
if (${{ github.event.inputs.global || '$true' }}) {
'${{ secrets.DEVLOOPED_TOKEN }}' | sponsor nuget --tos --exceptions --force --with-token
}
- name: ⬆️ commit
run: |
git add *.json
(git commit -m "πŸ–‰ Update OSS contributors stats" && git push) || echo "Done"