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*'
|
- 'v*'
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write # Required for creating releases
|
||||||
|
issues: read # Required for reading changelog
|
||||||
|
pull-requests: read # Required for reading changelog
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write # Required for creating releases at job level
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
@ -57,12 +61,15 @@ jobs:
|
|||||||
|
|
||||||
- name: Install and Configure GitHub CLI
|
- name: Install and Configure GitHub CLI
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
|
||||||
sudo apt install gh -y
|
&& 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
|
- name: Create Release with GitHub CLI
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Changed from GITHUB_TOKEN to GH_TOKEN
|
||||||
run: |
|
run: |
|
||||||
gh release create "${{ github.ref_name }}" \
|
gh release create "${{ github.ref_name }}" \
|
||||||
--title "Release ${{ steps.get_version.outputs.VERSION }}" \
|
--title "Release ${{ steps.get_version.outputs.VERSION }}" \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user