diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 704c353..3839c26 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 }}" \