Skip to content

Commit 31dfe6a

Browse files
fix(workflow): grant contents write permission
1 parent 587e84c commit 31dfe6a

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/publish.yml

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

8+
permissions:
9+
contents: write # needed to create releases
10+
811
jobs:
912
publish:
1013
runs-on: ubuntu-latest
@@ -60,9 +63,15 @@ jobs:
6063
# run: |
6164
# git config --local user.email "github-actions[bot]@users.noreply.github.com"
6265
# git config --local user.name "github-actions[bot]"
66+
67+
- name: Install GitHub CLI
68+
run: sudo apt-get install gh -y
69+
6370
- name: Create GitHub release
6471
if: steps.check.outputs.version_equal == 'true'
6572
run: |
66-
gh release create "v${{ steps.check.outputs.new_version }}" --title "v${{ steps.check.outputs.new_version }}"
73+
gh release create "v${{ steps.check.outputs.new_version }}" \
74+
dist/* \
75+
--title "v${{ steps.check.outputs.new_version }}"
6776
env:
68-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)