Skip to content

Commit 48286f4

Browse files
committed
Update release workflow
Signed-off-by: Tamal Saha <tamal@appscode.com>
1 parent 8bf5cab commit 48286f4

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

.github/workflows/release.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ concurrency:
1111
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
1212
cancel-in-progress: true
1313

14+
permissions:
15+
contents: write # Grants write access to repository contents, including releases
16+
1417
jobs:
1518
build:
1619
name: Build
@@ -43,7 +46,16 @@ jobs:
4346
make release
4447
4548
- name: Release
46-
uses: softprops/action-gh-release@v1
47-
if: startsWith(github.ref, 'refs/tags/')
49+
uses: actions/github-script@v6
50+
with:
51+
script: |
52+
const { repo, owner } = context.repo;
53+
const tag = context.ref.replace('refs/tags/', '');
54+
await github.rest.repos.createRelease({
55+
owner,
56+
repo,
57+
tag_name: tag,
58+
generate_release_notes: true,
59+
});
4860
env:
4961
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)