|
| 1 | +name: PIE Player Components CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [develop, master] |
| 6 | + pull_request: |
| 7 | + branches: [develop, master] |
| 8 | + |
| 9 | +jobs: |
| 10 | + test: |
| 11 | + runs-on: ubuntu-latest |
| 12 | + steps: |
| 13 | + - uses: actions/checkout@v5 |
| 14 | + with: |
| 15 | + fetch-depth: 0 # REQUIRED for lerna version |
| 16 | + - name: Configure Git |
| 17 | + run: | |
| 18 | + git config user.name "github-actions[bot]" |
| 19 | + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" |
| 20 | + - uses: actions/setup-node@v5 |
| 21 | + with: |
| 22 | + node-version: 24 |
| 23 | + cache: yarn |
| 24 | + - name: Cache Puppeteer Chrome |
| 25 | + uses: actions/cache@v5 |
| 26 | + with: |
| 27 | + path: ~/.cache/puppeteer |
| 28 | + key: puppeteer-chrome-115.0.5790.98 |
| 29 | + - name: Install dependencies |
| 30 | + run: yarn install --frozen-lockfile |
| 31 | + env: |
| 32 | + PUPPETEER_SKIP_DOWNLOAD: true |
| 33 | + - name: Install Chrome for Puppeteer (v115.0.5790.98) |
| 34 | + run: node node_modules/puppeteer/install.js |
| 35 | + - name: Install Chrome system dependencies |
| 36 | + run: | |
| 37 | + sudo apt-get update |
| 38 | + sudo apt-get install -y \ |
| 39 | + libgbm1 \ |
| 40 | + libnss3 \ |
| 41 | + libnspr4 \ |
| 42 | + libatk1.0-0 \ |
| 43 | + libatk-bridge2.0-0 \ |
| 44 | + libcups2 \ |
| 45 | + libdrm2 \ |
| 46 | + libxkbcommon0 \ |
| 47 | + libxcomposite1 \ |
| 48 | + libxdamage1 \ |
| 49 | + libxfixes3 \ |
| 50 | + libxrandr2 \ |
| 51 | + libxss1 \ |
| 52 | + fonts-liberation |
| 53 | + - run: yarn run test |
| 54 | + |
| 55 | + build-next: |
| 56 | + needs: test |
| 57 | + if: > |
| 58 | + github.event_name == 'push' && |
| 59 | + github.ref == 'refs/heads/develop' |
| 60 | + runs-on: ubuntu-latest |
| 61 | + permissions: |
| 62 | + contents: write |
| 63 | + pull-requests: write |
| 64 | + issues: write |
| 65 | + id-token: write # REQUIRED for npm trusted publishing |
| 66 | + steps: |
| 67 | + - uses: actions/checkout@v5 |
| 68 | + with: |
| 69 | + fetch-depth: 0 # REQUIRED for lerna version |
| 70 | + - name: Configure Git |
| 71 | + run: | |
| 72 | + git config user.name "github-actions[bot]" |
| 73 | + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" |
| 74 | + - uses: actions/setup-node@v5 |
| 75 | + with: |
| 76 | + node-version: 24 |
| 77 | + registry-url: https://registry.npmjs.org/ |
| 78 | + cache: yarn |
| 79 | + - run: yarn install --frozen-lockfile |
| 80 | + env: |
| 81 | + PUPPETEER_SKIP_DOWNLOAD: true |
| 82 | + - run: yarn run build:dev |
| 83 | + - run: yarn run semantic-release |
| 84 | + env: |
| 85 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 86 | + |
| 87 | + build-release: |
| 88 | + needs: test |
| 89 | + if: > |
| 90 | + github.event_name == 'push' && |
| 91 | + github.ref == 'refs/heads/master' |
| 92 | + runs-on: ubuntu-latest |
| 93 | + permissions: |
| 94 | + contents: write |
| 95 | + pull-requests: write |
| 96 | + issues: write |
| 97 | + id-token: write # REQUIRED for npm trusted publishing |
| 98 | + steps: |
| 99 | + - uses: actions/checkout@v5 |
| 100 | + with: |
| 101 | + fetch-depth: 0 # REQUIRED for lerna version |
| 102 | + - name: Configure Git |
| 103 | + run: | |
| 104 | + git config user.name "github-actions[bot]" |
| 105 | + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" |
| 106 | + - name: Prune orphaned Git tags |
| 107 | + run: | |
| 108 | + git fetch origin --prune --tags --force |
| 109 | + - uses: actions/setup-node@v5 |
| 110 | + with: |
| 111 | + node-version: 24 |
| 112 | + registry-url: https://registry.npmjs.org/ |
| 113 | + cache: yarn |
| 114 | + - run: yarn install --frozen-lockfile |
| 115 | + env: |
| 116 | + PUPPETEER_SKIP_DOWNLOAD: true |
| 117 | + - run: yarn run build |
| 118 | + - run: yarn run semantic-release |
| 119 | + env: |
| 120 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments