Skip to content

Update Microsoft (#80) #1029

Update Microsoft (#80)

Update Microsoft (#80) #1029

name: SDK Publish (Unstable)
on:
schedule:
- cron: "30 0 * * *"
workflow_dispatch:
push:
branches:
- master
jobs:
publish:
runs-on: ubuntu-22.04
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
defaults:
run:
working-directory: ./src
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
ref: "master"
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4
with:
dotnet-version: |
8.0.x
- name: Install dotnet-setversion
run: |
dotnet tool install -g dotnet-setversion
- name: Restore packages
run: |
dotnet restore
dotnet tool restore
- name: Create new version string
id: version
run: |
echo "number=$(echo $(date +'%Y.%m.%d')-unstable.$(date +'%Y%m%d%H%M'))" >> $GITHUB_OUTPUT
- name: Set project version
run: |
setversion ${{ steps.version.outputs.number }} Jellyfin.Sdk/Jellyfin.Sdk.csproj
- name: Generate sdk
run: |
dotnet nuke --configuration unstable
- name: Build packages
run: |
dotnet build -c Release Jellyfin.Sdk
- name: Publish to nuget
run: |
dotnet nuget push artifacts/package/release/*.nupkg --api-key ${{ secrets.NUGET_APIKEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
- name: Commit new changes to the repo
run: |
git config user.name jellyfin-bot
git config user.email [email protected]
git checkout -B openapi-unstable
git add .
git commit --allow-empty -m "Update unstable OpenAPI client"
git push --force origin openapi-unstable