feat: enhance release workflow by adding permissions for issues and pull requests, and updating GitHub CLI installation method
This commit is contained in:
parent
3e9b89f69b
commit
07741f2a52
15
.github/workflows/release.yml
vendored
15
.github/workflows/release.yml
vendored
@ -6,11 +6,15 @@ on:
|
||||
- 'v*'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
contents: write # Required for creating releases
|
||||
issues: read # Required for reading changelog
|
||||
pull-requests: read # Required for reading changelog
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write # Required for creating releases at job level
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@ -57,12 +61,15 @@ jobs:
|
||||
|
||||
- name: Install and Configure GitHub CLI
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install gh -y
|
||||
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
|
||||
&& sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
|
||||
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
|
||||
&& sudo apt update \
|
||||
&& sudo apt install gh -y
|
||||
|
||||
- name: Create Release with GitHub CLI
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Changed from GITHUB_TOKEN to GH_TOKEN
|
||||
run: |
|
||||
gh release create "${{ github.ref_name }}" \
|
||||
--title "Release ${{ steps.get_version.outputs.VERSION }}" \
|
||||
|
Loading…
x
Reference in New Issue
Block a user