Soluto/shisell-js

View on GitHub
.github/workflows/release.yml

Summary

Maintainability
Test Coverage
name: Release

on:
  push:
    branches:
      - master

jobs:
  release:
    name: Release
    runs-on: ubuntu-latest
    if: "!contains(github.event.head_commit.message, '[skip ci]')"
    env:
      CI: true
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          fetch-depth: 0

      - name: Use Node.js 16.x
        uses: actions/setup-node@v2
        with:
          node-version: 16.x

      - name: Cache node_modules
        uses: actions/cache@v2
        with:
          path: |
            **/node_modules
          key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
          restore-keys: |
            yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
            yarn-${{ runner.OS }}-${{ env.cache-name }}
            yarn-${{ runner.OS }}-

      - name: Install dependencies
        run: yarn --frozen-lockfile

      - name: Release
        run: yarn semantic-release
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}