mirror of
https://github.com/jellyfin/jellyfin-sdk-swift.git
synced 2024-11-27 00:10:31 +00:00
Create sdk-unstable-branch.yaml (#24)
This commit is contained in:
parent
ecc338b4ac
commit
c277dace7d
46
.github/workflows/sdk-unstable-branch.yaml
vendored
Normal file
46
.github/workflows/sdk-unstable-branch.yaml
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
name: Generate Unstable Branch
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
concurrency:
|
||||
group: unstable-branch
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macos-latest
|
||||
if: ${{ github.repository == 'jellyfin/jellyfin-sdk-swift' }}
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: main
|
||||
token: ${{ secrets.JF_BOT_TOKEN }}
|
||||
|
||||
- name: Download unstable OpenAPI schema
|
||||
run: |
|
||||
curl -sL https://repo.jellyfin.org/releases/openapi/jellyfin-openapi-unstable.json -o jellyfin-openapi-stable.json
|
||||
cp -rf jellyfin-openapi-stable.json $GITHUB_WORKSPACE/Sources
|
||||
|
||||
- name: Generate API
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE
|
||||
swift package --allow-writing-to-package-directory generate-api
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
swift build
|
||||
|
||||
- name: Commit changes
|
||||
run: |
|
||||
git config user.name jellyfin-bot
|
||||
git config user.email team@jellyfin.org
|
||||
git checkout -B openapi-unstable
|
||||
git add .
|
||||
git commit --allow-empty -m "Update OpenAPI to unstable"
|
||||
git push --force origin openapi-unstable
|
Loading…
Reference in New Issue
Block a user