Skip to content

Commit e390284

Browse files
Gooolerffurrer2
authored andcommitted
Improve README
- Indicate license badge to the local file, it works for both local and web markdown renders. - Remove duplicate release title in example and resort the params. - Use with write permission, this might be necessary in some repos.
1 parent 873f210 commit e390284

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Extract Release Notes
44

55
[![CI](https://github.com/ffurrer2/extract-release-notes/workflows/CI/badge.svg)](https://github.com/ffurrer2/extract-release-notes/actions?query=workflow%3ACI)
6-
[![MIT License](https://img.shields.io/github/license/ffurrer2/extract-release-notes)](https://github.com/ffurrer2/extract-release-notes/blob/main/LICENSE)
6+
[![MIT License](https://img.shields.io/github/license/ffurrer2/extract-release-notes)](LICENSE)
77
[![GitHub Release](https://img.shields.io/github/v/release/ffurrer2/extract-release-notes?sort=semver)](https://github.com/ffurrer2/extract-release-notes/releases/latest)
88

99
This GitHub Action extracts release notes from a [Keep a Changelog](https://keepachangelog.com/) formatted changelog file.
@@ -44,6 +44,8 @@ jobs:
4444
release:
4545
name: Create release
4646
runs-on: ubuntu-latest
47+
permissions:
48+
contents: write
4749
steps:
4850
- name: Checkout
4951
uses: actions/checkout@v4
@@ -53,7 +55,7 @@ jobs:
5355
- name: Create release
5456
env:
5557
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56-
run: gh release create --notes '${{ steps.extract-release-notes.outputs.release_notes }}' --title ${{ github.ref_name }} ${{ github.ref_name }}
58+
run: gh release create ${{ github.ref_name }} --title ${{ github.ref_name }} --notes '${{ steps.extract-release-notes.outputs.release_notes }}'
5759
```
5860
5961
This code will extract the content between the second and third H2 header from the `CHANGELOG.md` file, store this content in the output variable `release_notes` and create a release using the [`gh release create`](https://cli.github.com/manual/gh_release_create) command.

0 commit comments

Comments
 (0)