Skip to content

Commit

Permalink
chore(ci): corrected release action
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarosabu committed Nov 30, 2024
1 parent 10e914e commit eab5e98
Showing 1 changed file with 27 additions and 23 deletions.
50 changes: 27 additions & 23 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,36 @@ name: Release CI

on:
push:
branches: [main, next, beta]
branches: [main]
pull_request:
branches: [main, next, beta]
branches: [main]

env:
PNPM_CACHE_FOLDER: .pnpm-store
SKIP_INSTALL_SIMPLE_GIT_HOOKS: 1 # Skip installing simple-git-hooks

jobs:
release:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '20'
cache: npm
- name: Install dependencies
run: npm ci
- name: Build lib
run: npm run build
- name: Jest run
run: npm run test:unit
- name: Cypress run
run: npm run test:e2e
- name: Release
working-directory: lib
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Build lib
run: pnpm build
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpx semantic-release

0 comments on commit eab5e98

Please sign in to comment.