Skip to content

Commit 28724f0

Browse files
committed
ci(build-and-release): changelog preview without environment
1 parent a12bdec commit 28724f0

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

.github/workflows/build-and-release.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,33 +26,33 @@ jobs:
2626
lib
2727
umd
2828
29-
dry-run:
30-
name: Dry run
29+
changelog:
30+
name: Changelog
3131
runs-on: ubuntu-latest
32-
environment: npm
3332
steps:
3433
- name: Checkout
3534
uses: actions/checkout@v3
3635
with:
37-
token: ${{ secrets.GH_TOKEN }}
38-
fetch-depth: 0 # necessary for correct CHANGELOGS
36+
fetch-depth: 0 # necessary for correct changelog
3937
- name: Set up node
4038
uses: actions/setup-node@v3
4139
with:
4240
node-version: 18
4341
cache: yarn
4442
- name: Install
4543
run: yarn install --immutable
46-
- name: Dry run release
47-
env:
48-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
49-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
50-
run: yarn release --dry-run >> $GITHUB_STEP_SUMMARY
44+
- name: Changelog
45+
run: |
46+
yarn semantic-release \
47+
-p @semantic-release/release-notes-generator \
48+
--dry-run \
49+
| tee changelog.out
50+
sed -n '/#/,$p' changelog.out >> $GITHUB_STEP_SUMMARY
5151
5252
release:
5353
name: Release
5454
runs-on: ubuntu-latest
55-
needs: [build, dry-run]
55+
needs: [build, changelog]
5656
environment: npm
5757
steps:
5858
- name: Checkout

0 commit comments

Comments
 (0)