sounisi5011/readme-generator

View on GitHub
.github/workflows/shipjs-trigger.yml

Summary

Maintainability
Test Coverage
name: Ship js trigger
on:
  pull_request:
    types:
      - closed
jobs:
  build:
    name: Release
    runs-on: ubuntu-latest
    if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'releases/v')
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0
          ref: master
      - uses: actions/setup-node@v1
        with:
          registry-url: "https://registry.npmjs.org"
      - run: |
          if [ -f "yarn.lock" ]; then
            yarn install
          else
            npm install
          fi
      - run: npx shipjs trigger
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
          SLACK_INCOMING_HOOK: ${{ secrets.SLACK_INCOMING_HOOK }}