cargo-binstall/.github/workflows/release-pr.yml
Jiahao XU d22433799a
Fix permission of release-pr.yml (#1988)
It needs permission pull-request to create PR

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
2024-11-29 10:39:52 +00:00

72 lines
2.1 KiB
YAML

name: Open a release PR
on:
workflow_dispatch:
inputs:
crate:
description: Crate to release
required: true
type: choice
options:
- atomic-file-install
- bin
- binstalk
- binstalk-bins
- binstalk-fetchers
- binstalk-git-repo-api
- binstalk-registry
- binstalk-manifests
- binstalk-types
- binstalk-downloader
- cargo-toml-workspace
- detect-targets
- detect-wasi
- fs-lock
- normalize-path
version:
description: Version to release
required: true
type: string
default: patch
no-check-semver:
description: To disable check semver
required: true
type: string
default: "false"
permissions:
pull-requests: write
jobs:
make-release-pr:
permissions:
id-token: write # Enable OIDC
pull-requests: write
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure toolchain
run: |
rustup toolchain install --profile minimal --no-self-update nightly
rustup default nightly
- uses: chainguard-dev/actions/setup-gitsign@main
- name: Install cargo-release
uses: taiki-e/install-action@v2
with:
tool: cargo-release,cargo-semver-checks
env:
GITHUB_TOKEN: ${{ secrets.CI_RELEASE_TEST_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
- run: rustup toolchain install stable --no-self-update --profile minimal
- uses: cargo-bins/release-pr@v2.1.3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
version: ${{ inputs.version }}
crate-path: crates/${{ inputs.crate }}
pr-label: release
pr-release-notes: ${{ inputs.crate == 'bin' }}
pr-template-file: .github/scripts/release-pr-template.ejs
check-semver: ${{ inputs.crate != 'bin' && inputs.no-check-semver != 'true' }}
check-package: true
env:
RUSTFLAGS: --cfg reqwest_unstable