mirror of
https://github.com/jimeh/release-please-manifest-action.git
synced 2026-02-19 09:06:42 +00:00
This upgrades `tibdex/github-app-token` to `v2` and `google-github-actions/release-please-action` to `v4`. Among other things, this ensures that we are compatible with the GitHub Actions upgrade to Node 20, and avoiding issues when Node 16-based actions are deprecated sometime this spring. BREAKING CHANGE: Underlying actions have been upgraded, requiring changes to available inputs
163 lines
5.7 KiB
YAML
163 lines
5.7 KiB
YAML
---
|
|
name: "release-please-manifest-action"
|
|
description: >-
|
|
Opinionated action for running release-please in manifest mode with optional
|
|
support to authenticate as a GitHub App.
|
|
author: "jimeh"
|
|
inputs:
|
|
token:
|
|
description: "GitHub token used to authenticate."
|
|
required: false
|
|
default: "${{ github.token }}"
|
|
app-id:
|
|
description: >-
|
|
ID of the GitHub App to use for authentication. If set, takes precedence
|
|
over token input.
|
|
required: false
|
|
private-key:
|
|
description: >-
|
|
Private key of the GitHub App (can be Base64 encoded). Required when
|
|
app-id is provided.
|
|
required: false
|
|
installation-retrieval-mode:
|
|
description: >-
|
|
The mode used to retrieve the installation for which the token will be
|
|
requested. Must be one of: id, organization, repository, or user. For
|
|
details see: https://github.com/tibdex/github-app-token
|
|
default: "repository"
|
|
installation-retrieval-payload:
|
|
description: "The payload used to retrieve the installation."
|
|
default: "${{ github.repository }}"
|
|
permissions:
|
|
description: >-
|
|
JSON-stringified permissions granted to the app token. Defaults to all the
|
|
GitHub app permissions, see:
|
|
https://docs.github.com/en/rest/apps/apps#create-an-installation-access-token-for-an-app
|
|
github-api-url:
|
|
description: "Configure github API URL."
|
|
required: false
|
|
default: "${{ github.api_url }}"
|
|
target-branch:
|
|
description: "Branch to open pull release PR against (detected by default)"
|
|
required: false
|
|
default: ""
|
|
config-file:
|
|
description: "Pat to config file within the project."
|
|
required: false
|
|
default: ".github/release-please-config.json"
|
|
manifest-file:
|
|
description: "Path to manifest file within the project."
|
|
required: false
|
|
default: ".github/.release-please-manifest.json"
|
|
path:
|
|
description: >-
|
|
Create a release from a path other than the repository's root.
|
|
required: false
|
|
default: ""
|
|
fork:
|
|
description: >-
|
|
If true, send the PR from a fork. This requires the token to be a user
|
|
that can create forks (e.g. not the default GITHUB_TOKEN)
|
|
required: false
|
|
default: "false"
|
|
proxy-server:
|
|
description: >-
|
|
Set proxy sever when you run this action behind a proxy. Format is
|
|
host:port e.g. proxy-host.com:8080
|
|
required: false
|
|
default: ""
|
|
|
|
outputs:
|
|
release_created:
|
|
description: "Whether or not a release was created."
|
|
value: ${{ steps.release-please.outputs.release_created }}
|
|
releases_created:
|
|
description: "Whether or not a release was created."
|
|
value: ${{ steps.release-please.outputs.releases_created }}
|
|
id:
|
|
description: "Release ID."
|
|
value: ${{ steps.release-please.outputs.id }}
|
|
name:
|
|
description: "Release name."
|
|
value: ${{ steps.release-please.outputs.name }}
|
|
tag_name:
|
|
description: "Release tag name."
|
|
value: ${{ steps.release-please.outputs.tag_name }}
|
|
sha:
|
|
description: "Release SHA."
|
|
value: ${{ steps.release-please.outputs.sha }}
|
|
body:
|
|
description: "Release body."
|
|
value: ${{ steps.release-please.outputs.body }}
|
|
html_url:
|
|
description: "Release URL."
|
|
value: ${{ steps.release-please.outputs.html_url }}
|
|
draft:
|
|
description: "Whether or not the release is a draft."
|
|
value: ${{ steps.release-please.outputs.draft }}
|
|
upload_url:
|
|
description: "Release upload URL."
|
|
value: ${{ steps.release-please.outputs.upload_url }}
|
|
path:
|
|
description: "Path that was released."
|
|
value: ${{ steps.release-please.outputs.path }}
|
|
version:
|
|
description: "Version that was released."
|
|
value: ${{ steps.release-please.outputs.version }}
|
|
major:
|
|
description: "Major version that was released."
|
|
value: ${{ steps.release-please.outputs.major }}
|
|
minor:
|
|
description: "Minor version that was released."
|
|
value: ${{ steps.release-please.outputs.minor }}
|
|
patch:
|
|
description: "Patch version that was released."
|
|
value: ${{ steps.release-please.outputs.patch }}
|
|
paths_released:
|
|
description: "Paths that were released."
|
|
value: ${{ steps.release-please.outputs.paths_released }}
|
|
pr:
|
|
description: "Pull request number."
|
|
value: ${{ steps.release-please.outputs.pr }}
|
|
prs:
|
|
description: "Pull request numbers."
|
|
value: ${{ steps.release-please.outputs.prs }}
|
|
release-please:
|
|
description: "All outputs from release-please action as a JSON string."
|
|
value: ${{ toJSON(steps.release-please.outputs) }}
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- uses: tibdex/github-app-token@v2
|
|
if: inputs.app-id != null && inputs.app-id != ''
|
|
id: github-app-token
|
|
with:
|
|
app_id: ${{ inputs.app-id }}
|
|
installation_retrieval_mode: ${{ inputs.installation-retrieval-mode }}
|
|
installation_retrieval_payload: ${{ inputs.installation-retrieval-payload }}
|
|
github_api_url: ${{ inputs.github-api-url }}
|
|
permissions: ${{ inputs.permissions }}
|
|
private_key: ${{ inputs.private-key }}
|
|
- name: resolve token
|
|
id: token
|
|
run: |-
|
|
echo "token=${APP_TOKEN:-$INPUT_TOKEN}" >> "$GITHUB_OUTPUT"
|
|
env:
|
|
APP_TOKEN: "${{ steps.github-app-token.outputs.token }}"
|
|
INPUT_TOKEN: "${{ inputs.token }}"
|
|
shell: bash
|
|
- uses: google-github-actions/release-please-action@v4
|
|
id: release-please
|
|
with:
|
|
token: ${{ steps.token.outputs.token }}
|
|
target-branch: ${{ inputs.target-branch }}
|
|
path: ${{ inputs.path }}
|
|
config-file: ${{ inputs.config-file }}
|
|
manifest-file: ${{ inputs.manifest-file }}
|
|
github-api-url: ${{ inputs.github-api-url }}
|
|
github-graphql-url: ${{ inputs.github-api-url }}
|
|
repo-url: ${{ inputs.repository }}
|
|
fork: ${{ inputs.fork }}
|
|
proxy-server: ${{ inputs.proxy-server }}
|