Skip to content

Commit 5efb137

Browse files
committed
fix: add permissions to release workflow
1 parent ead1b88 commit 5efb137

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
tags:
66
- 'v*'
77

8+
permissions:
9+
contents: write
10+
811
jobs:
912
release:
1013
runs-on: ubuntu-latest
@@ -34,15 +37,6 @@ jobs:
3437
with:
3538
script: |
3639
const tag = context.ref.replace('refs/tags/', '');
37-
const changelog = await github.rest.repos.getContent({
38-
owner: context.repo.owner,
39-
repo: context.repo.repo,
40-
path: 'CHANGELOG.md'
41-
});
42-
43-
const changelogContent = Buffer.from(changelog.data.content, 'base64').toString();
44-
const versionSection = changelogContent.split('## [' + tag + ']')[1];
45-
const releaseNotes = versionSection ? versionSection.split('## [')[0] : '';
4640
4741
await github.rest.repos.createRelease({
4842
owner: context.repo.owner,
@@ -51,7 +45,8 @@ jobs:
5145
name: 'Release ' + tag,
5246
body: `## 🎉 Release ${tag}
5347
54-
${releaseNotes}
48+
### What's New
49+
- Check the [CHANGELOG.md](https://github.com/HUA-Labs/i18n-sdk/blob/main/CHANGELOG.md) for detailed changes
5550
5651
### Installation
5752
\`\`\`bash

0 commit comments

Comments
 (0)