feat(flashing): prevent flashing #59
Workflow file for this run
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: 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/[email protected] | |
- name: β¬οΈ Checkout repo | |
uses: actions/checkout@v3 | |
- name: β Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'yarn' | |
- name: π₯ Install deps | |
run: yarn --frozen-lockfile | |
- name: βΆοΈ Run validate script | |
run: yarn validate | |
- name: π₯ Install Playwright Browsers | |
id: playwright-version | |
run: | | |
echo "PLAYWRIGHT_VERSION=$(node -e "console.log(JSON.parse(require('child_process').execSync('yarn info @playwright/test version --json')).data.trim())")" >> $GITHUB_ENV | |
- name: ποΈ Cache playwright binaries | |
uses: actions/cache@v3 | |
id: playwright-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@v2 | |
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/[email protected] | |
- name: β¬οΈ Checkout repo | |
uses: actions/checkout@v3 | |
- name: β Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'yarn' | |
- 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')" | |
yarn --frozen-lockfile | |
- name: π Run build script | |
run: yarn build | |
- name: π Release | |
uses: cycjimmy/semantic-release-action@v3 | |
with: | |
working_directory: ./packages/remix-themes | |
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 }} |