NaturalCycles/nodejs-lib

View on GitHub
.github/workflows/release.yml

Summary

Maintainability
Test Coverage
name: release

on:
  push:
    branches: [master, next, act]

env:
  NODE_OPTIONS: --max-old-space-size=3200

jobs:
  release-job:
    runs-on: ubuntu-latest
    steps:
      - { uses: actions/checkout@v4, with: { persist-credentials: true } }
      - { uses: actions/setup-node@v4, with: { node-version: 'lts/*', cache: 'yarn' } }

      # Cache for npm/npx in ~/.npm
      - uses: actions/cache@v3
        with:
          path: ~/.npm
          key: npm-v1-${{ runner.os }}

      - run: yarn --frozen-lockfile
      - run: yarn build-prod

      - name: release
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
        run: npx @naturalcycles/semantic-release