Skip to content

major: React Router v7 support #82

major: React Router v7 support

major: React Router v7 support #82

Workflow file for this run

name: validate
on:
push:
branches:
- "+([0-9])?(.{+([0-9]),x}).x"
- "main"
- "next"
- "next-major"
- "beta"
- "alpha"
- "!all-contributors/**"
pull_request: {}
jobs:
main:
# ignore all-contributors PRs
if: ${{ !contains(github.head_ref, 'all-contributors') }}
runs-on: ubuntu-latest
steps:
- name: πŸ›‘ Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.1
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
- name: βŽ” Setup node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "npm"
- name: πŸ“₯ Install deps
run: npm install
- name: ▢️ Run validate script
run: npm run validate
- name: πŸ“₯ Install Playwright Browsers
id: playwright-version
run: |
echo "PLAYWRIGHT_VERSION=$(node -e "console.log(JSON.parse(require('child_process').execSync('npm info @playwright/test version --json')).trim())")" >> $GITHUB_ENV
- name: 🏎️ Cache playwright binaries
uses: actions/cache@v4
id: planwright-cache
with:
path: |
~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}
- run: npx playwright install --with-deps
if: steps.playwright-cache.outputs.cache-hit != 'true'
- run: npx playwright install-deps
if: steps.playwright-cache.outputs.cache-hit == 'true'
- name: 🎭 Playwright tests
run: npx playwright test
- name: πŸ“Š Upload report
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
release:
needs: main
runs-on: ubuntu-latest
if: ${{ github.repository == 'abereghici/remix-themes' &&
contains('refs/heads/main,refs/heads/beta,refs/heads/next,refs/heads/alpha',
github.ref) && github.event_name == 'push' }}
steps:
- name: πŸ›‘ Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.1
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
- name: βŽ” Setup node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "npm"
- name: πŸ“₯ Install deps
run: |
# cp README.md packages/remix-themes
# node -e "let pkg=require('./package.json');pkg.workspaces=['packages/remix-themes'];require('fs').writeFileSync('./package.json',JSON.stringify(pkg),'utf8')"
npm install
- name: πŸ— Run build script
run: npm run build
- name: πŸš€ Release
uses: cycjimmy/semantic-release-action@v4
with:
working_directory: .
semantic_version: 17
branches: |
[
'+([0-9])?(.{+([0-9]),x}).x',
'main',
'next',
'next-major',
{name: 'beta', prerelease: true},
{name: 'alpha', prerelease: true}
]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}