Skip to content

Update .github/workflows/release.yml #24

Update .github/workflows/release.yml

Update .github/workflows/release.yml #24

Workflow file for this run

name: release
on:
push:
branches:
- main
- v5
jobs:
call-build-lint-test-workflow:
uses: ./.github/workflows/build-lint-test.yml
deploy:
runs-on: ubuntu-latest
needs: [call-build-lint-test-workflow]
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- uses: actions/cache@v4
id: npm-cache
name: Cache npm deps
with:
path: |
node_modules
**/node_modules
~/.cache/Cypress
key: ${{ runner.os }}-yarn-14-${{ secrets.CACHE_VERSION }}-${{ hashFiles('package-lock.json') }}
- run: npm install --frozen-lockfile
if: steps.npm-cache.outputs.cache-hit != 'true'
- uses: actions/cache@v4
id: dist
name: Cache dist
with:
path: |
packages/*/dist
packages/react-styles/css
key: ${{ runner.os }}-dist-14-${{ secrets.CACHE_VERSION }}-${{ hashFiles('package-lock.json', 'package.json', 'packages/*/*', '!packages/*/dist', '!packages/*/node_modules') }}
- name: Build dist
run: npm run build
if: steps.dist.outputs.cache-hit != 'true'
- name: Release to NPM
run: cd packages/module && npx semantic-release@19.0.5