Merge pull request #681 from jellyfin/renovate/tsconfig-recommended-1.x #789
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: SDK Unstable Branch | |
on: | |
schedule: | |
- cron: '0 5 * * *' | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
concurrency: | |
group: unstable-branch | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
if: ${{ github.repository == 'jellyfin/jellyfin-sdk-typescript' }} | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
ref: master | |
token: ${{ secrets.JF_BOT_TOKEN }} | |
- name: Set up Node.js | |
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | |
with: | |
node-version: 20 | |
check-latest: true | |
cache: npm | |
- name: Download unstable OpenAPI schema | |
run: | | |
curl -sL https://repo.jellyfin.org/releases/openapi/jellyfin-openapi-unstable.json -o openapi.json | |
npm run fix-schema | |
cp openapi.json $HOME | |
- name: Set UNSTABLE_API_VERSION | |
run: | | |
VERSION=$(jq -r .info.version openapi.json) | |
echo "UNSTABLE_API_VERSION=${VERSION}" >> $GITHUB_ENV | |
- name: Install Node.js dependencies | |
run: npm ci --no-audit | |
- name: Update generated sources | |
run: | | |
cp $HOME/openapi.json . | |
npm run build:generated-client | |
sed -i "s/API_VERSION = '.*'/API_VERSION = '${{ env.UNSTABLE_API_VERSION }}'/" src/versions.ts | |
- name: Commit changes | |
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 OpenAPI to unstable" | |
git push --force origin openapi-unstable |