-
-
Notifications
You must be signed in to change notification settings - Fork 11
69 lines (58 loc) · 1.84 KB
/
sdk-publish-unstable.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # 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