diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index f5b9b794..c853cf9a 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -26,16 +26,14 @@ jobs: lib umd - dry-run: - name: Dry run + changelog: + name: Changelog runs-on: ubuntu-latest - environment: npm steps: - name: Checkout uses: actions/checkout@v3 with: - token: ${{ secrets.GH_TOKEN }} - fetch-depth: 0 # necessary for correct CHANGELOGS + fetch-depth: 0 # necessary for correct changelog - name: Set up node uses: actions/setup-node@v3 with: @@ -43,16 +41,18 @@ jobs: cache: yarn - name: Install run: yarn install --immutable - - name: Dry run release - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - run: yarn release --dry-run >> $GITHUB_STEP_SUMMARY + - name: Changelog + run: | + yarn semantic-release \ + -p @semantic-release/release-notes-generator \ + --dry-run \ + | tee changelog.out + sed -n '/#/,$p' changelog.out >> $GITHUB_STEP_SUMMARY release: name: Release runs-on: ubuntu-latest - needs: [build, dry-run] + needs: [build, changelog] environment: npm steps: - name: Checkout