name: Preview semantic-release

on:
  pull_request:
    branches: ['*']

jobs:
  preview-semantic-release:
    name: Preview semantic-release
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - name: Use Node.js 15.x
        uses: actions/setup-node@v2
        with:
          node-version: 15
      - name: Install dependencies
        run: npm ci
      - name: Build
        run: npm run build --if-present
      - name: Preview semantic-release
        run: npx @kai/show-next-version@next
