Skip to content

SDK Publish (Unstable) #949

SDK Publish (Unstable)

SDK Publish (Unstable) #949

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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
ref: "master"
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # 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