Skip to content

Latest commit

 

History

History
176 lines (121 loc) · 5.71 KB

File metadata and controls

176 lines (121 loc) · 5.71 KB

GitHub Reusable Workflow: Prepare release

Prepare release

Release License Stars PRs Welcome

Overview

Reusable workflow that performs release preparation tasks:

  • Add proper labels to pull requests

Permissions

  • contents: read
  • id-token: write
  • pull-requests: write

Usage

name: Prepare release
on:
  push:
    branches:
      - main
permissions: {}
jobs:
  prepare-release:
    uses: hoverkraft-tech/ci-github-publish/.github/workflows/prepare-release.yml@b56be562f38e0e3e712f09691a8fe930aae9db1b # 0.22.0
    permissions: {}
    secrets:
      # GitHub token with following permissions:
      #
      # - `contents: read`
      # - `pull-requests: write`
      github-token: ""
    with:
      # JSON array of runner(s) to use.
      # See https://docs.github.com/en/actions/using-jobs/choosing-the-runner-for-a-job.
      #
      # Default: `["ubuntu-latest"]`
      runs-on: '["ubuntu-latest"]'

      # Working directory used to scope release preparation in a monorepo.
      # If specified, the workflow looks for `.github/release-configs/{slug}.yml`, where `slug` is derived from the working directory basename.
      # If that file does not exist, a temporary release configuration is generated with `include-paths` for the working directory and current workflow file.
      working-directory: ""

Inputs

Workflow Call Inputs

Input Description Required Type Default
runs-on JSON array of runner(s) to use. false string ["ubuntu-latest"]
See https://docs.github.com/en/actions/using-jobs/choosing-the-runner-for-a-job.
working-directory Working directory used to scope release preparation in a monorepo. false string -
If specified, the workflow looks for .github/release-configs/{slug}.yml, where slug is derived from the working directory basename.
If that file does not exist, a temporary release configuration is generated with include-paths for the working directory and current workflow file.

Secrets

Secret Description Required
github-token GitHub token with following permissions: false
- contents: read
- pull-requests: write

Examples

Basic usage

name: Prepare Release

on:
  push:
    branches: [main]
  pull_request:
    types: [opened, reopened, synchronize]

permissions: {}

jobs:
  prepare-release:
    uses: hoverkraft-tech/ci-github-publish/.github/workflows/prepare-release.yml@b56be562f38e0e3e712f09691a8fe930aae9db1b # 0.22.0
    permissions:
      contents: read
      pull-requests: write
    with:
      github-app-id: ${{ vars.CI_BOT_APP_ID }}
    secrets:
      github-app-key: ${{ secrets.CI_BOT_APP_PRIVATE_KEY }}

Contributing

Contributions are welcome! Please see the contributing guidelines for more details.

License

This project is licensed under the MIT License.

SPDX-License-Identifier: MIT

Copyright © 2026 hoverkraft-tech

For more details, see the license.


This documentation was automatically generated by CI Dokumentor.