Merge pull request #5001 from jellyfin/renovate/sortablejs-1.x #5
This file contains 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: Build | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
on: | |
push: | |
branches: [ master, release* ] | |
pull_request: | |
branches: [ master, release* ] | |
workflow_dispatch: | |
jobs: | |
run-build-prod: | |
name: Run production build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Setup node environment | |
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 | |
with: | |
node-version: 20 | |
check-latest: true | |
cache: npm | |
- name: Install Node.js dependencies | |
run: npm ci --no-audit | |
- name: Run a production build | |
run: npm run build:production | |
- name: Upload artifact | |
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 | |
with: | |
name: jellyfin-web__prod | |
path: | | |
dist | |
pr_context: | |
name: Save PR context as artifact | |
if: ${{ always() && !cancelled() && github.event_name == 'pull_request' }} | |
runs-on: ubuntu-latest | |
needs: | |
- run-build-prod | |
steps: | |
- name: Save PR context | |
env: | |
PR_NUMBER: ${{ github.event.number }} | |
PR_SHA: ${{ github.sha }} | |
run: | | |
echo $PR_NUMBER > PR_number | |
echo $PR_SHA > PR_sha | |
- name: Upload PR number as artifact | |
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 | |
with: | |
name: PR_context | |
path: | | |
PR_number | |
PR_sha |