name: "Release: create" permissions: contents: read pull-requests: write on: workflow_dispatch: inputs: version: required: true description: Version to release, without the v (e.g. 1.2.3) ref: default: main description: Ref to start the release from (e.g. main, sha) create_release: type: boolean default: true description: Create a release after merging the PR defaults: run: shell: bash --noprofile --norc -euo pipefail {0} jobs: create_pr: timeout-minutes: 10 runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 with: ref: ${{ github.event.inputs.ref }} - name: Sanitize version id: sanitize env: RAW_VERSION: ${{ github.event.inputs.version }} run: | VERSION="${RAW_VERSION#v}" printf 'version=%s\n' "$VERSION" >> "$GITHUB_OUTPUT" - name: Update versions env: VERSION: ${{ steps.sanitize.outputs.version }} run: | printf '%s\n' "$VERSION" > version.txt - name: Create Pull Request uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0 with: branch: release/${{ steps.sanitize.outputs.version }} commit-message: "chore: release v${{ steps.sanitize.outputs.version }}" committer: Github Action Deploy author: Github Action Deploy title: Release v${{ steps.sanitize.outputs.version }} labels: | release ${{ github.event.inputs.create_release == true && 'create_release' || '' }}