Skip to content

fix(update): resolve npm for updates #919

fix(update): resolve npm for updates

fix(update): resolve npm for updates #919

Workflow file for this run

name: validate
on:
push:
branches: ['main']
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
jobs:
lint:
name: ⬣ ESLint
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
- name: βŽ” Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: πŸ“₯ Download deps
uses: bahmutov/npm-install@v1
with:
useLockFile: false
- name: πŸ”¬ Lint
run: npm run lint
build:
name: πŸ— Build
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
- name: βŽ” Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: πŸ“₯ Download deps
uses: bahmutov/npm-install@v1
with:
useLockFile: false
- name: πŸ— Build
run: npm run build
- name: πŸ“¦ Upload All Build Artifacts
uses: actions/upload-artifact@v4
with:
name: all-build-artifacts
path: |
packages/workshop-app/build
packages/workshop-app/dist
packages/workshop-presence/dist
packages/workshop-utils/dist
typecheck:
name: Κ¦ TypeScript
needs: [build]
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
- name: βŽ” Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: πŸ“₯ Download deps
uses: bahmutov/npm-install@v1
with:
useLockFile: false
- name: πŸ“₯ Download All Build Artifacts
uses: actions/download-artifact@v4
with:
name: all-build-artifacts
path: packages
- name: πŸ”Ž Type check
run: npm run typecheck
playwright:
name: 🎭 Playwright
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
- name: βŽ” Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: πŸ“₯ Download deps
uses: bahmutov/npm-install@v1
with:
useLockFile: false
- name: πŸ“₯ Install Playwright Browsers
run: npx playwright install --with-deps
- 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
example:
name: πŸ€Ήβ€β™‚οΈ Example
needs: [build]
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
- name: βŽ” Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: πŸ“₯ Download deps
uses: bahmutov/npm-install@v1
with:
useLockFile: false
- name: πŸ“₯ Download All Build Artifacts
uses: actions/download-artifact@v4
with:
name: all-build-artifacts
path: packages
- name: ▢️ Run setup script
run: node setup.mjs
working-directory: ./example
continue-on-error: true
release:
name: πŸš€ Release
needs: [lint, typecheck, build, playwright]
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: 'true'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if:
${{ github.repository == 'epicweb-dev/epicshop' &&
contains('refs/heads/main', github.ref) && github.event_name == 'push' }}
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: βŽ” Setup node
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
- name: πŸ“₯ Download deps
uses: bahmutov/npm-install@v1
with:
useLockFile: false
- name: πŸ“₯ Download All Build Artifacts
uses: actions/download-artifact@v4
with:
name: all-build-artifacts
path: packages
- name: πŸš€ Release
run: npx tsx other/release.ts --dry-run=false