mirror of
https://github.com/jimeh/release-please-manifest-action.git
synced 2026-02-19 09:06:42 +00:00
Compare commits
12 Commits
v0.0.6
...
reusable-w
| Author | SHA1 | Date | |
|---|---|---|---|
|
715528c92e
|
|||
|
|
ffac38c285 | ||
| 023c0d0dc3 | |||
| 322dcdf56e | |||
|
|
38d93f4a8a | ||
|
22f0022a09
|
|||
|
|
8ae0004991 | ||
|
1139eaec31
|
|||
|
48a1ac7188
|
|||
|
|
5a9880757d | ||
|
9d21ba2763
|
|||
|
4d6baa6f81
|
3
.github/.release-please-manifest.json
vendored
Normal file
3
.github/.release-please-manifest.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
".": "1.0.1"
|
||||
}
|
||||
3
.github/release-please-config.json
vendored
3
.github/release-please-config.json
vendored
@@ -9,8 +9,7 @@
|
||||
"bump-minor-pre-major": true,
|
||||
"bump-patch-for-minor-pre-major": true,
|
||||
"draft": false,
|
||||
"prerelease": false,
|
||||
"initial-version": "0.0.1"
|
||||
"prerelease": false
|
||||
}
|
||||
},
|
||||
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
|
||||
|
||||
3
.github/release-please-manifest.json
vendored
3
.github/release-please-manifest.json
vendored
@@ -1,3 +0,0 @@
|
||||
{
|
||||
".": "0.0.6"
|
||||
}
|
||||
187
.github/workflows/manifest.yml
vendored
Normal file
187
.github/workflows/manifest.yml
vendored
Normal file
@@ -0,0 +1,187 @@
|
||||
---
|
||||
name: release-please-manifest
|
||||
on:
|
||||
workflow_call:
|
||||
#
|
||||
# Secrets
|
||||
#
|
||||
secrets:
|
||||
token:
|
||||
description: GitHub token used to authenticate.
|
||||
required: false
|
||||
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
|
||||
#
|
||||
# Inputs
|
||||
#
|
||||
inputs:
|
||||
runs_on:
|
||||
description: "GitHub Actions runs-on value for release please job."
|
||||
default: "ubuntu-latest"
|
||||
type: string
|
||||
required: false
|
||||
installation-id:
|
||||
description: >-
|
||||
ID of the installation for which the app token will be requested.
|
||||
Defaults to the ID of the repository's installation.
|
||||
type: string
|
||||
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
|
||||
type: string
|
||||
github-api-url:
|
||||
description: Configure github API URL.
|
||||
type: string
|
||||
required: false
|
||||
default: ${{ github.api_url }}
|
||||
repository:
|
||||
description: >-
|
||||
The full name of the repository to operate on in owner/repo format.
|
||||
Defaults to the current repository.
|
||||
type: string
|
||||
default: ${{ github.repository }}
|
||||
default-branch:
|
||||
description: >-
|
||||
Branch to open pull release PR against. Defaults to the repository's
|
||||
default branch.
|
||||
type: string
|
||||
required: false
|
||||
default: ""
|
||||
config-file:
|
||||
description: Pat to config file within the project.
|
||||
type: string
|
||||
required: false
|
||||
default: ".github/release-please-config.json"
|
||||
manifest-file:
|
||||
description: Path to manifest file within the project.
|
||||
type: string
|
||||
required: false
|
||||
default: ".github/.release-please-manifest.json"
|
||||
#
|
||||
# Outputs
|
||||
#
|
||||
outputs:
|
||||
release_created:
|
||||
description: "Whether or not a release was created."
|
||||
value: ${{ jobs.release-please-manifest.outputs.release_created }}
|
||||
releases_created:
|
||||
description: "Whether or not a release was created."
|
||||
value: ${{ jobs.release-please-manifest.outputs.releases_created }}
|
||||
id:
|
||||
description: "Release ID."
|
||||
value: ${{ jobs.release-please-manifest.outputs.id }}
|
||||
name:
|
||||
description: "Release name."
|
||||
value: ${{ jobs.release-please-manifest.outputs.name }}
|
||||
tag_name:
|
||||
description: "Release tag name."
|
||||
value: ${{ jobs.release-please-manifest.outputs.tag_name }}
|
||||
sha:
|
||||
description: "Release sha"
|
||||
value: ${{ jobs.release-please-manifest.outputs.sha }}
|
||||
body:
|
||||
description: "Release body."
|
||||
value: ${{ jobs.release-please-manifest.outputs.body }}
|
||||
html_url:
|
||||
description: "Release URL."
|
||||
value: ${{ jobs.release-please-manifest.outputs.html_url }}
|
||||
draft:
|
||||
description: "Whether or not the release is a draft."
|
||||
value: ${{ jobs.release-please-manifest.outputs.draft }}
|
||||
upload_url:
|
||||
description: "Release upload URL."
|
||||
value: ${{ jobs.release-please-manifest.outputs.upload_url }}
|
||||
path:
|
||||
description: "Path that was released."
|
||||
value: ${{ jobs.release-please-manifest.outputs.path }}
|
||||
version:
|
||||
description: "Version that was released."
|
||||
value: ${{ jobs.release-please-manifest.outputs.version }}
|
||||
major:
|
||||
description: "Major version that was released."
|
||||
value: ${{ jobs.release-please-manifest.outputs.major }}
|
||||
minor:
|
||||
description: "Minor version that was released."
|
||||
value: ${{ jobs.release-please-manifest.outputs.minor }}
|
||||
patch:
|
||||
description: "Patch version that was released."
|
||||
value: ${{ jobs.release-please-manifest.outputs.patch }}
|
||||
paths_released:
|
||||
description: "Paths that were released."
|
||||
value: ${{ jobs.release-please-manifest.outputs.paths_released }}
|
||||
pr:
|
||||
description: "Pull request number."
|
||||
value: ${{ jobs.release-please-manifest.outputs.pr }}
|
||||
prs:
|
||||
description: "Pull request numbers."
|
||||
value: ${{ jobs.release-please-manifest.outputs.prs }}
|
||||
release-please:
|
||||
description: "All outputs from release-please action as a JSON string."
|
||||
value: ${{ jobs.release-please-manifest.outputs.release-please }}
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
release-please-manifest:
|
||||
runs-on: ${{ inputs.runs_on }}
|
||||
if: >-
|
||||
github.ref == 'refs/heads/main' ||
|
||||
github.ref == 'refs/heads/master' ||
|
||||
(
|
||||
inputs.default-branch != '' &&
|
||||
github.ref == format('refs/heads/{0}', inputs.default-branch)
|
||||
)
|
||||
outputs:
|
||||
release_created: ${{ steps.release-please.outputs.release_created }}
|
||||
releases_created: ${{ steps.release-please.outputs.releases_created }}
|
||||
id: ${{ steps.release-please.outputs.id }}
|
||||
name: ${{ steps.release-please.outputs.name }}
|
||||
tag_name: ${{ steps.release-please.outputs.tag_name }}
|
||||
sha: ${{ steps.release-please.outputs.sha }}
|
||||
body: ${{ steps.release-please.outputs.body }}
|
||||
html_url: ${{ steps.release-please.outputs.html_url }}
|
||||
draft: ${{ steps.release-please.outputs.draft }}
|
||||
upload_url: ${{ steps.release-please.outputs.upload_url }}
|
||||
path: ${{ steps.release-please.outputs.path }}
|
||||
version: ${{ steps.release-please.outputs.version }}
|
||||
major: ${{ steps.release-please.outputs.major }}
|
||||
minor: ${{ steps.release-please.outputs.minor }}
|
||||
patch: ${{ steps.release-please.outputs.patch }}
|
||||
paths_released: ${{ steps.release-please.outputs.paths_released }}
|
||||
pr: ${{ steps.release-please.outputs.pr }}
|
||||
prs: ${{ steps.release-please.outputs.prs }}
|
||||
release-please: ${{ toJSON(steps.release-please.outputs) }}
|
||||
steps:
|
||||
- name: Determine which token to use
|
||||
id: token
|
||||
run: |-
|
||||
echo "token=${GIVEN_TOKEN:-$GITHUB_TOKEN}" >> "$GITHUB_OUTPUT"
|
||||
env:
|
||||
GITHUB_TOKEN: "${{ github.token }}"
|
||||
GIVEN_TOKEN: "${{ secrets.token }}"
|
||||
shell: bash
|
||||
- uses: jimeh/release-please-manifest-action@v1
|
||||
id: release-please
|
||||
with:
|
||||
token: ${{ steps.token.outputs.token }}
|
||||
app-id: ${{ secrets.app-id }}
|
||||
private-key: ${{ secrets.private-key }}
|
||||
installation-id: ${{ inputs.installation-id }}
|
||||
permissions: ${{ inputs.permissions }}
|
||||
github-api-url: ${{ inputs.github-api-url }}
|
||||
repository: ${{ inputs.repository }}
|
||||
default-branch: ${{ inputs.default-branch }}
|
||||
config-file: ${{ inputs.config-file }}
|
||||
manifest-file: ${{ inputs.manifest-file }}
|
||||
@@ -1,11 +1,13 @@
|
||||
---
|
||||
name: CI
|
||||
on: push
|
||||
name: Release
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
release-please:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.ref == 'refs/heads/main'
|
||||
steps:
|
||||
- uses: jimeh/release-please-manifest-action@main
|
||||
id: release
|
||||
32
CHANGELOG.md
32
CHANGELOG.md
@@ -1,5 +1,37 @@
|
||||
# Changelog
|
||||
|
||||
## [1.0.1](https://github.com/jimeh/release-please-manifest-action/compare/v1.0.0...v1.0.1) (2023-05-08)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **action:** set correct action name in action.yml metadata ([#10](https://github.com/jimeh/release-please-manifest-action/issues/10)) ([322dcdf](https://github.com/jimeh/release-please-manifest-action/commit/322dcdf56ed8be4589ffbd70cb1382198ca65120))
|
||||
|
||||
## [1.0.0](https://github.com/jimeh/release-please-manifest-action/compare/v0.1.1...v1.0.0) (2023-05-08)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **release:** prepare for v1.0.0 ([22f0022](https://github.com/jimeh/release-please-manifest-action/commit/22f0022a0932f5639bb4808df16e76c245256880))
|
||||
|
||||
## [0.1.1](https://github.com/jimeh/release-please-manifest-action/compare/v0.1.0...v0.1.1) (2023-05-08)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **release:** rename CI workflow to Release ([1139eae](https://github.com/jimeh/release-please-manifest-action/commit/1139eaec31e83556c1eb35a523ee76485efb9ab5))
|
||||
|
||||
## [0.1.0](https://github.com/jimeh/release-please-manifest-action/compare/v0.0.6...v0.1.0) (2023-05-08)
|
||||
|
||||
|
||||
### ⚠ BREAKING CHANGES
|
||||
|
||||
* **action:** Change default manifest path to `.github/.release-please-manifest.json`.
|
||||
|
||||
### Features
|
||||
|
||||
* **action:** change default manifest file path ([4d6baa6](https://github.com/jimeh/release-please-manifest-action/commit/4d6baa6f81afde8c72681281cc4f6a9f675b8dda))
|
||||
|
||||
## [0.0.6](https://github.com/jimeh/release-please-manifest-action/compare/v0.0.5...v0.0.6) (2023-05-08)
|
||||
|
||||
|
||||
|
||||
49
README.md
49
README.md
@@ -38,13 +38,18 @@ running [release-please][] in [manifest mode][].
|
||||
|
||||
- Focuses on and only supports running release-please's manifest command.
|
||||
- Optionally supports having release-please authenticate as a GitHub App.
|
||||
- By default places release-please config and manifest files within the
|
||||
top-level `.github` directory instead of in the repository root:
|
||||
- `.github/release-please-manifest.json`
|
||||
- `.github/release-please-config.json`
|
||||
- Defaults to looking for release-please's config and manifest files within the
|
||||
top-level `.github` directory instead of in the repository root.
|
||||
|
||||
# Examples
|
||||
|
||||
All examples assume you have placed your `release-please-config.json` and
|
||||
`.release-please-manifest.json` within the `.github` directory in the root of
|
||||
the repository.
|
||||
|
||||
See release-please's [manifest-releaser][manifest mode] documentation for
|
||||
details about the config and manifest files.
|
||||
|
||||
## Basic (Actions Token)
|
||||
|
||||
This example will have release-please authenticate using `secrets.GITHUB_TOKEN`
|
||||
@@ -68,7 +73,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.ref == 'refs/heads/main'
|
||||
steps:
|
||||
- uses: jimeh/release-please-manifest-action@v0
|
||||
- uses: jimeh/release-please-manifest-action@v1
|
||||
```
|
||||
|
||||
<!-- x-release-please-end -->
|
||||
@@ -88,7 +93,7 @@ jobs:
|
||||
with:
|
||||
command: manifest
|
||||
config-file: .github/release-please-config.json
|
||||
manifest-file: .github/release-please-manifest.json
|
||||
manifest-file: .github/.release-please-manifest.json
|
||||
```
|
||||
|
||||
_Note: Outputs are not included in this equivalence example._
|
||||
@@ -114,7 +119,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.ref == 'refs/heads/main'
|
||||
steps:
|
||||
- uses: jimeh/release-please-manifest-action@v0
|
||||
- uses: jimeh/release-please-manifest-action@v1
|
||||
with:
|
||||
token: ${{ secrets.RELEASE_PAT_TOKEN }}
|
||||
```
|
||||
@@ -137,7 +142,7 @@ jobs:
|
||||
token: ${{ secrets.RELEASE_PAT_TOKEN }}
|
||||
command: manifest
|
||||
config-file: .github/release-please-config.json
|
||||
manifest-file: .github/release-please-manifest.json
|
||||
manifest-file: .github/.release-please-manifest.json
|
||||
```
|
||||
|
||||
_Note: Outputs are not included in this equivalence example._
|
||||
@@ -174,7 +179,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.ref == 'refs/heads/main'
|
||||
steps:
|
||||
- uses: jimeh/release-please-manifest-action@v0
|
||||
- uses: jimeh/release-please-manifest-action@v1
|
||||
with:
|
||||
app-id: ${{ secrets.RELEASE_BOT_APP_ID }}
|
||||
private-key: ${{ secrets.RELEASE_BOT_PRIVATE_KEY }}
|
||||
@@ -203,7 +208,7 @@ jobs:
|
||||
token: ${{ steps.github-app-token.outputs.token }}
|
||||
command: manifest
|
||||
config-file: .github/release-please-config.json
|
||||
manifest-file: .github/release-please-manifest.json
|
||||
manifest-file: .github/.release-please-manifest.json
|
||||
```
|
||||
|
||||
_Note: Outputs are not included in this equivalence example._
|
||||
@@ -216,18 +221,18 @@ _Note: Outputs are not included in this equivalence example._
|
||||
|
||||
## Inputs
|
||||
|
||||
| parameter | description | required | default |
|
||||
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------------------------------------ |
|
||||
| token | GitHub token used to authenticate. | `false` | ${{ github.token }} |
|
||||
| app-id | ID of the GitHub App to use for authentication. If set, takes precedence over token input. | `false` | |
|
||||
| private-key | Private key of the GitHub App (can be Base64 encoded). Required when app-id is provided. | `false` | |
|
||||
| installation-id | ID of the installation for which the app token will be requested. Defaults to the ID of the repository's installation. | `false` | |
|
||||
| permissions | 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 | `false` | |
|
||||
| github-api-url | Configure github API URL. | `false` | ${{ github.api_url }} |
|
||||
| repository | The full name of the repository to operate on in owner/repo format. Defaults to the current repository. | `false` | ${{ github.repository }} |
|
||||
| default-branch | Branch to open pull release PR against. Defaults to the repository's default branch. | `false` | |
|
||||
| config-file | Pat to config file within the project. | `false` | .github/release-please-config.json |
|
||||
| manifest-file | Path to manifest file within the project. | `false` | .github/release-please-manifest.json |
|
||||
| parameter | description | required | default |
|
||||
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------------------------------------- |
|
||||
| token | GitHub token used to authenticate. | `false` | ${{ github.token }} |
|
||||
| app-id | ID of the GitHub App to use for authentication. If set, takes precedence over token input. | `false` | |
|
||||
| private-key | Private key of the GitHub App (can be Base64 encoded). Required when app-id is provided. | `false` | |
|
||||
| installation-id | ID of the installation for which the app token will be requested. Defaults to the ID of the repository's installation. | `false` | |
|
||||
| permissions | 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 | `false` | |
|
||||
| github-api-url | Configure github API URL. | `false` | ${{ github.api_url }} |
|
||||
| repository | The full name of the repository to operate on in owner/repo format. Defaults to the current repository. | `false` | ${{ github.repository }} |
|
||||
| default-branch | Branch to open pull release PR against. Defaults to the repository's default branch. | `false` | |
|
||||
| config-file | Pat to config file within the project. | `false` | .github/release-please-config.json |
|
||||
| manifest-file | Path to manifest file within the project. | `false` | .github/.release-please-manifest.json |
|
||||
|
||||
<!-- action-docs-inputs -->
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
name: "release-please-action"
|
||||
name: "release-please-manifest-action"
|
||||
description: >-
|
||||
Opinionated action for running release-please in manifest mode with optional
|
||||
support to authenticate as a GitHub App.
|
||||
@@ -52,7 +52,7 @@ inputs:
|
||||
manifest-file:
|
||||
description: Path to manifest file within the project.
|
||||
required: false
|
||||
default: ".github/release-please-manifest.json"
|
||||
default: ".github/.release-please-manifest.json"
|
||||
|
||||
outputs:
|
||||
release_created:
|
||||
|
||||
Reference in New Issue
Block a user