Skip to content

Commit

Permalink
ci: extract changelog for GitHub release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
Conaclos committed Aug 30, 2023
1 parent fb57c3a commit 02804da
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 19 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Install toolchain
uses: moonrepo/setup-rust@v0
- name: Build main binary
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/release_cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Install Node.js
uses: actions/setup-node@v3
Expand Down Expand Up @@ -141,8 +139,6 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Install wasm-pack
uses: jetli/[email protected]
Expand Down Expand Up @@ -210,6 +206,9 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Extract changelog
run: |
bash scripts/print-last-release-changelog.sh >| ${{ github.workspace }}/RELEASE_NOTES
- name: Create GitHub release and tag
uses: softprops/action-gh-release@v1
env:
Expand All @@ -219,7 +218,7 @@ jobs:
tag_name: cli/v${{ needs.build.outputs.version }}
draft: false
prerelease: ${{ needs.build.outputs.prerelease == 'true' }}
body_path: ${{ github.workspace }}/RELEASE_NOTES
files: |
biome-*
fail_on_unmatched_files: true
generate_release_notes: true
7 changes: 4 additions & 3 deletions .github/workflows/release_js_api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Install Node.js
uses: actions/setup-node@v3
Expand Down Expand Up @@ -154,6 +152,9 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Extract changelog
run: |
bash scripts/print-last-release-changelog.sh>| ${{ github.workspace }}/RELEASE_NOTES
- name: Create GitHub release and tag
uses: softprops/action-gh-release@v1
env:
Expand All @@ -163,4 +164,4 @@ jobs:
tag_name: js-api/v${{ needs.build.outputs.version }}
draft: false
prerelease: ${{ needs.build.outputs.prerelease == 'true' }}
generate_release_notes: true
body_path: ${{ github.workspace }}/RELEASE_NOTES
7 changes: 4 additions & 3 deletions .github/workflows/release_lsp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Install toolchain
uses: moonrepo/setup-rust@v0
Expand Down Expand Up @@ -228,6 +226,9 @@ jobs:
env:
OVSX_PAT: ${{ secrets.OVSX_PAT }}

- name: Extract changelog
run: |
bash scripts/print-last-release-changelog.sh >| ${{ github.workspace }}/RELEASE_NOTES
- name: Create GitHub release and tag
uses: softprops/action-gh-release@v1
env:
Expand All @@ -237,7 +238,7 @@ jobs:
tag_name: lsp/v${{ needs.build.outputs.version }}
draft: false
prerelease: ${{ needs.build.outputs.prerelease == 'true' }}
body_path: ${{ github.workspace }}/RELEASE_NOTES
files: |
biome_lsp-*.vsix
fail_on_unmatched_files: true
generate_release_notes: true
5 changes: 2 additions & 3 deletions .github/workflows/website_deploy_preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ jobs:
runs-on: ubuntu-latest
environment: Website deployment
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/website_deploy_prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ jobs:
runs-on: ubuntu-latest
environment: Website deployment
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
Expand Down
5 changes: 5 additions & 0 deletions scripts/print-last-release-changelog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
set -eu

# print Changelog body of the last released version
awk '/^## [0-9]/ { if (p) { exit }; p=1; next } p' CHANGELOG.md

0 comments on commit 02804da

Please sign in to comment.