name: Release Notes

on:
  push:
    tags:
      - 'v*.*.*'

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - uses: actions/setup-node@v1
        with:
          node-version: '12.x'
      - name: Generate Changelog
        run: |
          echo "# itk.js ${GITHUB_REF/refs\/tags\//}" > ./release-notes.md
          cat ./doc/release-introduction.md >> ./release-notes.md
          git fetch origin --tags -f
          npx conventional-changelog-cli -p angular -r 2 -o ./CHANGELOG.md
          cat ./CHANGELOG.md >> ./release-notes.md
      - name: Release
        uses: softprops/action-gh-release@v1
        if: startsWith(github.ref, 'refs/tags/')
        with:
          body_path: ./release-notes.md
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

name: Release Notes

on:
  push:
    tags:
      - 'v*.*.*'

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          fetch-depth: 0

      - uses: actions/setup-node@v1
        with:
          node-version: '12.x'

      - name: Generate Changelog
        run: |
          echo "# itk.js ${GITHUB_REF/refs\/tags\//}" > ./release-notes.md
          cat ./doc/release-introduction.md >> ./release-notes.md
          git fetch origin --tags -f
          npx conventional-changelog-cli -p angular -r 2 -o ./CHANGELOG.md
          cat ./CHANGELOG.md >> ./release-notes.md

      - name: Release
        uses: softprops/action-gh-release@v1
        if: startsWith(github.ref, 'refs/tags/')
        with:
          body_path: ./release-notes.md
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Set checkout fetch-depth to 0
ci(ReleaseNotes): Set checkout fetch-depth to 0

We need all commits and tags from the full history.
