40 Commits
v0.0.2 ... v2

Author SHA1 Message Date
jimehbot[bot]
bfd8923580 chore(main): release 2.0.0 (#21)
Co-authored-by: jimehbot[bot] <132453784+jimehbot[bot]@users.noreply.github.com>
Co-authored-by: Jim Myhrberg <contact@jimeh.me>
2025-03-07 01:07:34 +00:00
068da4bf6a chore(ci): tweak release-please config 2025-03-07 01:04:33 +00:00
1406584702 ci(release): always update release PRs 2025-03-07 01:01:43 +00:00
8e21350bd9 ci(deps): upgrade to latest actions 2025-03-07 00:57:14 +00:00
4a3aba93da chore(deps): upgrade release-please-action and github-app-token to latest major versions (#20) 2025-03-07 00:46:04 +00:00
e774497e31 Revert "wip: test upgrading to latest versions of dependencies which include breaking changes"
This reverts commit 0b17a543d3.
2025-03-06 01:40:22 +00:00
0b17a543d3 wip: test upgrading to latest versions of dependencies which include breaking changes 2025-03-06 01:38:39 +00:00
9c79e61e2c ci(release): switch back to stable version of self for release job 2024-05-13 10:13:47 +01:00
jimehbot[bot]
094ab0890e chore(main): release 1.0.3 (#19)
Co-authored-by: jimehbot[bot] <132453784+jimehbot[bot]@users.noreply.github.com>
2024-05-13 10:07:10 +01:00
72e49f5d6f fix(deps): use new name for Google's release please action (#18) 2024-05-13 10:06:22 +01:00
jimehbot[bot]
9e6111fa06 chore(main): release 1.0.2 (#16)
Co-authored-by: jimehbot[bot] <132453784+jimehbot[bot]@users.noreply.github.com>
2023-05-19 00:48:19 +01:00
f307f175b9 fix(action): correct minor typo in action metadata (#14) 2023-05-19 00:47:10 +01:00
09a0ac2e59 ci(release): run release-please through a GitHub App (#15) 2023-05-19 00:45:29 +01:00
b2f2b18196 Merge pull request #13 from jimeh/tweak-ci 2023-05-19 00:31:52 +01:00
5ce2d33d70 ci(docs): add job to verify generated docs in readme are up to date 2023-05-19 00:30:08 +01:00
59ebc8ab5c ci(release): switch to stable v1 of self 2023-05-19 00:23:18 +01:00
42fbbf7a6f ci(release): switch to jimeh/update-tags-actions to move major/minor tags 2023-05-19 00:22:38 +01:00
github-actions[bot]
ffac38c285 chore(main): release 1.0.1 (#11) 2023-05-08 02:22:07 +01:00
023c0d0dc3 chore(release): remove "release-as" option (#12) 2023-05-08 02:21:09 +01:00
322dcdf56e fix(action): set correct action name in action.yml metadata (#10) 2023-05-08 02:18:34 +01:00
github-actions[bot]
38d93f4a8a chore(main): release 1.0.0 (#9) 2023-05-08 02:06:18 +01:00
22f0022a09 feat(release): prepare for v1.0.0 2023-05-08 01:58:29 +01:00
github-actions[bot]
8ae0004991 chore(main): release 0.1.1 (#8) 2023-05-08 01:53:50 +01:00
1139eaec31 feat(release): rename CI workflow to Release 2023-05-08 01:51:38 +01:00
48a1ac7188 docs(readme): update features list and examples intro 2023-05-08 01:46:41 +01:00
github-actions[bot]
5a9880757d chore(main): release 0.1.0 (#7) 2023-05-08 01:26:42 +01:00
9d21ba2763 chore(release): rename release-please manifest file 2023-05-08 01:25:23 +01:00
4d6baa6f81 feat(action)!: change default manifest file path
Brings this action more inline with the upstream action, by keeping the
config and manifest filenames identical, and simply moving them into the
".github" directory.

BREAKING CHANGE: Change default manifest path to `.github/.release-please-manifest.json`.
2023-05-08 01:22:13 +01:00
github-actions[bot]
1d94b44003 chore(main): release 0.0.6 (#6) 2023-05-08 01:14:05 +01:00
8634e410ba docs(readme): remove permissions directive from examples 2023-05-08 01:10:40 +01:00
04d3b1edbb fix(release): remove permissions block
Instead lets set permissions in repository settings and see if that
works without the permissions settings in the workflow.
2023-05-08 01:07:55 +01:00
c2d85862fd fix(release): attempt to fix release job permissions
It seems the "pull-request: write" permission on the job did not work.
So we are now setting permissions at the workflow level
2023-05-08 01:06:44 +01:00
b60e27befe feat(release): remove use of GitHub App
We don't currently have any CI checks to run on pull requests, so
there's no need to author Release PRs from an app.
2023-05-08 00:57:10 +01:00
a056b80ec3 docs(readme): update examples 2023-05-08 00:57:10 +01:00
jimehbot[bot]
4205a83fff chore(main): release 0.0.5 (#5) 2023-05-08 00:47:43 +01:00
e012dc88b9 fix(release): actually tag MAJOR 2023-05-08 00:44:56 +01:00
jimehbot[bot]
1255f9741b chore(main): release 0.0.4 (#4)
Co-authored-by: jimehbot[bot] <132453784+jimehbot[bot]@users.noreply.github.com>
2023-05-08 00:41:55 +01:00
77312c11a9 fix(release): attempt to sign major and minor tags 2023-05-08 00:38:46 +01:00
jimehbot[bot]
ccc95c2796 chore(main): release 0.0.3 (#3) 2023-05-07 22:49:49 +01:00
08e227b305 fix(release): use full version in tag annotations 2023-05-07 22:39:31 +01:00
8 changed files with 339 additions and 157 deletions

3
.github/.release-please-manifest.json vendored Normal file
View File

@@ -0,0 +1,3 @@
{
".": "2.0.0"
}

View File

@@ -1,16 +1,16 @@
{
"always-update": true,
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
"draft": false,
"prerelease": false,
"packages": {
".": {
"release-type": "simple",
"changelog-path": "CHANGELOG.md",
"extra-files": [
"README.md"
],
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
"draft": false,
"prerelease": false,
"initial-version": "0.0.1"
]
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"

View File

@@ -1,3 +0,0 @@
{
".": "0.0.2"
}

View File

@@ -1,36 +1,33 @@
---
name: CI
name: Release
on: push
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: make docs
- name: Verify no changes after docs build
run: |
git diff --exit-code
release-please:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
permissions:
contents: write
steps:
- uses: jimeh/release-please-manifest-action@main
- uses: jimeh/release-please-manifest-action@v1
id: release
with:
app-id: ${{ secrets.RELEASE_BOT_APP_ID }}
private-key: ${{ secrets.RELEASE_BOT_PRIVATE_KEY }}
- uses: actions/checkout@v3
- name: MAJOR and MAJOR.MINOR tags
if: ${{ steps.release.outputs.release_created }}
- name: Tag major and minor versions
if: ${{ steps.release.outputs.release_created }}
run: |
git config user.name 'jimehbot[bot]'
git config user.email '132453784+jimehbot[bot]@users.noreply.github.com'
git remote add gh-token "https://${GITHUB_TOKEN}@github.com/${{ github.repository }}.git"
git tag -d "$MAJOR_TAG" || true
git tag -d "$MINOR_TAG" || true
git push origin ":${MAJOR_TAG}" || true
git push origin ":${MINOR_TAG}" || true
git tag -a "$MAJOR_TAG" -m "Release ${MAJOR_TAG}"
git tag -a "$MINOR_TAG" -m "Release ${MINOR_TAG}"
git push origin "$MAJOR_TAG"
git push origin "$MINOR_TAG"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}
MAJOR_TAG: v${{ steps.release.outputs.major }}
MINOR_TAG: v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}
uses: jimeh/update-tags-action@v1
with:
tags: |
v${{ steps.release.outputs.major }}
v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}

View File

@@ -1,5 +1,101 @@
# Changelog
## [2.0.0](https://github.com/jimeh/release-please-manifest-action/compare/v1.0.3...v2.0.0) (2025-03-07)
### ⚠ BREAKING CHANGES
* **input:** rename `default-branch` input to `target-branch`
* **input:** replaced `installation-id` input with `installation-retrieval-mode`
* **output:** rename `release-please` output to `raw`
### Features
* **deps:** upgrade release-please-action and github-app-token to latest major versions ([4a3aba9](https://github.com/jimeh/release-please-manifest-action/commit/4a3aba93da18573def6f5583082327e81c38c6d4))
* **input:** rename `default-branch` input to `target-branch` ([4a3aba9](https://github.com/jimeh/release-please-manifest-action/commit/4a3aba93da18573def6f5583082327e81c38c6d4))
* **input:** replaced `installation-id` input with `installation-retrieval-mode` ([4a3aba9](https://github.com/jimeh/release-please-manifest-action/commit/4a3aba93da18573def6f5583082327e81c38c6d4))
* **output:** rename `release-please` output to `raw` ([4a3aba9](https://github.com/jimeh/release-please-manifest-action/commit/4a3aba93da18573def6f5583082327e81c38c6d4))
## [1.0.3](https://github.com/jimeh/release-please-manifest-action/compare/v1.0.2...v1.0.3) (2024-05-13)
### Bug Fixes
* **deps:** use new name for Google's release please action ([#18](https://github.com/jimeh/release-please-manifest-action/issues/18)) ([72e49f5](https://github.com/jimeh/release-please-manifest-action/commit/72e49f5d6f009b0e0c4faff0c835703ee9ee3093))
## [1.0.2](https://github.com/jimeh/release-please-manifest-action/compare/v1.0.1...v1.0.2) (2023-05-18)
### Bug Fixes
* **action:** correct minor typo in action metadata ([#14](https://github.com/jimeh/release-please-manifest-action/issues/14)) ([f307f17](https://github.com/jimeh/release-please-manifest-action/commit/f307f175b93d8eb1a1a4dfaf9092efaba72a6d62))
## [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)
### Features
* **release:** remove use of GitHub App ([b60e27b](https://github.com/jimeh/release-please-manifest-action/commit/b60e27befea7298731468ae0a66eff098c362d86))
### Bug Fixes
* **release:** attempt to fix release job permissions ([c2d8586](https://github.com/jimeh/release-please-manifest-action/commit/c2d85862fdd1bdcb9b7b10dcb3d35d3d60f4afc6))
* **release:** remove permissions block ([04d3b1e](https://github.com/jimeh/release-please-manifest-action/commit/04d3b1edbb4c7bd5f1b63b6bb3f65ca738ee1e52))
## [0.0.5](https://github.com/jimeh/release-please-manifest-action/compare/v0.0.4...v0.0.5) (2023-05-07)
### Bug Fixes
* **release:** actually tag MAJOR ([e012dc8](https://github.com/jimeh/release-please-manifest-action/commit/e012dc88b94fb4ce8433076d45479ee4d0ed01b2))
## [0.0.4](https://github.com/jimeh/release-please-manifest-action/compare/v0.0.3...v0.0.4) (2023-05-07)
### Bug Fixes
* **release:** attempt to sign major and minor tags ([77312c1](https://github.com/jimeh/release-please-manifest-action/commit/77312c11a926651d7f66d4fed3dcd5d0b50727ae))
## [0.0.3](https://github.com/jimeh/release-please-manifest-action/compare/v0.0.2...v0.0.3) (2023-05-07)
### Bug Fixes
* **release:** use full version in tag annotations ([08e227b](https://github.com/jimeh/release-please-manifest-action/commit/08e227b3057a732f0947407b8657123e5418e77c))
## [0.0.2](https://github.com/jimeh/release-please-manifest-action/compare/v0.0.1...v0.0.2) (2023-05-07)

View File

@@ -1,3 +1,10 @@
.PHONY: docs
docs: readme
.PHONY: readme
readme: check-npx action-docs
npx --yes prettier --print-width 80 --prose-wrap always --write README.md
.PHONY: action-docs
action-docs: check-npx
npx --yes action-docs --update-readme

167
README.md
View File

@@ -9,26 +9,16 @@
</p>
<p align="center">
<a href="https://github.com/jimeh/release-please-manifest-action/releases">
<img src="https://img.shields.io/github/v/tag/jimeh/release-please-manifest-action?label=release" alt="GitHub tag (latest SemVer)">
</a>
<a href="https://github.com/jimeh/release-please-manifest-action/issues">
<img src="https://img.shields.io/github/issues-raw/jimeh/release-please-manifest-action.svg?style=flat&logo=github&logoColor=white" alt="GitHub issues">
</a>
<a href="https://github.com/jimeh/release-please-manifest-action/pulls">
<img src="https://img.shields.io/github/issues-pr-raw/jimeh/release-please-manifest-action.svg?style=flat&logo=github&logoColor=white" alt="GitHub pull requests">
</a>
<a href="https://github.com/jimeh/release-please-manifest-action/blob/master/LICENSE">
<img src="https://img.shields.io/github/license/jimeh/release-please-manifest-action.svg?style=flat" alt="License Status">
</a>
<a href="https://github.com/jimeh/release-please-manifest-action/releases"><img src="https://img.shields.io/github/v/tag/jimeh/release-please-manifest-action?label=release" alt="GitHub tag (latest SemVer)"></a>
<a href="https://github.com/jimeh/release-please-manifest-action/issues"><img src="https://img.shields.io/github/issues-raw/jimeh/release-please-manifest-action.svg?style=flat&logo=github&logoColor=white" alt="GitHub issues"></a>
<a href="https://github.com/jimeh/release-please-manifest-action/pulls"><img src="https://img.shields.io/github/issues-pr-raw/jimeh/release-please-manifest-action.svg?style=flat&logo=github&logoColor=white" alt="GitHub pull requests"></a>
<a href="https://github.com/jimeh/release-please-manifest-action/blob/master/LICENSE"><img src="https://img.shields.io/github/license/jimeh/release-please-manifest-action.svg?style=flat" alt="License Status"></a>
</p>
A composite action which wraps [release-please-action][] and
[github-app-token][] actions, with opinionated default settings focused on
running [release-please][] in [manifest mode][].
[github-app-token][] actions, with opinionated defaults.
[release-please-action]:
https://github.com/google-github-actions/release-please-action
[release-please-action]: https://github.com/googleapis/release-please-action
[github-app-token]: https://github.com/tibdex/github-app-token
[release-please]: https://github.com/googleapis/release-please
[manifest mode]:
@@ -36,14 +26,30 @@ running [release-please][] in [manifest mode][].
# Features
- 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`
- Supports having release-please authenticate as a GitHub App.
- Supports dynamic target branch based on regular expression pattern, enabling
maintenance releases.
- Defaults to looking for release-please's config and manifest files within the
top-level `.github` directory instead of in the repository root.
# Examples
_Note: This action is not well suited for multi package/root release-please
configurations, as it does not support dynamic path-based outputs. A workaround
is to parse the `raw` output JSON string, but this is not ideal._
# Breaking changes from v1 to v2
- `default-branch` input was renamed to `target-branch`.
- `installation-id` input has been replaced by `installation-retrieval-mode`.
- `release-please` output was renamed to `raw`.
# Usage
All usage examples below 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)
@@ -66,9 +72,9 @@ on: push
jobs:
release-please:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/main'
steps:
- uses: jimeh/release-please-manifest-action@v0
- uses: jimeh/release-please-manifest-action@v2
```
<!-- x-release-please-end -->
@@ -81,14 +87,13 @@ on: push
jobs:
release-please:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/main'
steps:
- uses: google-github-actions/release-please-action@v3
- uses: googleapis/release-please-action@v4
id: release-please
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._
@@ -112,9 +117,9 @@ on: push
jobs:
release-please:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/main'
steps:
- uses: jimeh/release-please-manifest-action@v0
- uses: jimeh/release-please-manifest-action@v2
with:
token: ${{ secrets.RELEASE_PAT_TOKEN }}
```
@@ -129,15 +134,14 @@ on: push
jobs:
release-please:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/main'
steps:
- uses: google-github-actions/release-please-action@v3
- uses: googleapis/release-please-action@v4
id: release-please
with:
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._
@@ -162,7 +166,7 @@ Below we assume you have already setup `RELEASE_BOT_APP_ID` and
`RELEASE_BOT_PRIVATE_KEY` secrets in the repository or organization.
To set the private key secret, it is easiest to base64 encode the contents of
`*.pem` file you get from the GitHub App's configuration page. The base64
the `*.pem` file you get from the GitHub App's configuration page. The base64
encoded string should not have any line-breaks.
<!-- x-release-please-start-major -->
@@ -172,9 +176,9 @@ on: push
jobs:
release-please:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/main'
steps:
- uses: jimeh/release-please-manifest-action@v0
- uses: jimeh/release-please-manifest-action@v2
with:
app-id: ${{ secrets.RELEASE_BOT_APP_ID }}
private-key: ${{ secrets.RELEASE_BOT_PRIVATE_KEY }}
@@ -190,44 +194,73 @@ on: push
jobs:
release-please:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/main'
steps:
- uses: tibdex/github-app-token@v1
- uses: tibdex/github-app-token@v2
id: github-app-token
with:
app_id: ${{ secrets.RELEASE_BOT_APP_ID }}
private_key: ${{ secrets.RELEASE_BOT_PRIVATE_KEY }}
- uses: google-github-actions/release-please-action@v3
- uses: googleapis/release-please-action@v4
id: release-please
with:
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._
</details>
## Maintenance Releases
The `target-branch-pattern` input allows for dynamic targeting of different
branches. This means if you, for example, specify
`^(main|release-[0-9]+(\.[0-9]+)?)$` as the pattern, release-please will run
against the `main` branch, but also against any branch named `release-X` or
`release-X.X`, where `X` is one or more numbers.
The practical use of this looks something like this:
- The `main` branch is used for latest development and latest releases. Let's
assume it is on version 1.5.7 right now.
- The `release-1.4` branch was created from the latest 1.4.x tag, and fixes are
backported to it from `main`.
- When `main` is pushed to, release-please will create a release PR to merge
into `main` that bumps the version accordingly.
- When `release-1.4` is pushed to, release-please will create a release PR
against the `release-1.4` branch instead of `main`, so a new 1.4.x release can
be safely created.
The thing to be careful of when working on maintenance branches is that release-
please might try and bump the minor or even major version just like it would in
`main` depending on the commit types. This should be overridden by either doing
an empty commit with a `Release-As:` footer, or by modifying the commit types
when cherry picking.
# Reference
<!-- action-docs-inputs -->
## 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-retrieval-mode | When using app authentication, the mode used to retrieve the installation for which the token will be requested. For more information, see: https://github.com/tibdex/github-app-token/blob/v2/action.yml | `false` | repository |
| installation-retrieval-payload | When using app authentication, the payload used to retrieve the installation. For more information, see: https://github.com/tibdex/github-app-token/blob/v2/action.yml | `false` | ${{ github.repository }} |
| repositories | When using app authentication, the JSON-stringified array of the full names of the repositories the token should have access to. Defaults to all repositories that the installation can access. See https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#create-an-installation-access-token-for-an-app's `repositories`. | `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. Default `https://api.github.com` | `false` | ${{ github.api_url }} |
| github-graphql-url | Configure github GraphQL URL. Default `https://api.github.com/graphql` | `false` | ${{ github.graphql_url }} |
| repository | The full name of the repository to operate on in owner/repo format. Defaults to the current repository. | `false` | ${{ github.repository }} |
| target-branch | Branch to open pull release PR against. Defaults to the repository's default branch. | `false` | |
| target-branch-pattern | Regular expression pattern to determine if current ref name is a target branch or not. When specified, the action will only run if the current ref name matches the pattern, and the current ref name will be used as the target branch. When not specified, the action will always run, and target the specified target-branch, or the repository's default branch if target-branch is not specified. | `false` | |
| config-file | Path 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 -->
@@ -238,24 +271,26 @@ _Note: Outputs are not included in this equivalence example._
| parameter | description |
| ---------------- | -------------------------------------------------------- |
| release_created | Whether or not a release was created. |
| releases_created | Whether or not a release was created. |
| id | Release ID. |
| name | Release name. |
| tag_name | Release tag name. |
| sha | Release sha |
| body | Release body. |
| html_url | Release URL. |
| draft | Whether or not the release is a draft. |
| upload_url | Release upload URL. |
| path | Path that was released. |
| html_url | Release URL. |
| tag_name | Release tag name. |
| version | Version that was released. |
| major | Major version that was released. |
| minor | Minor version that was released. |
| patch | Patch version that was released. |
| paths_released | Paths that were released. |
| sha | Release SHA. |
| pr | Pull request number. |
| path | Path that was released. |
| releases_created | Whether or not a release was created. |
| paths_released | Paths that were released. |
| id | Release ID. |
| name | Release name. |
| body | Release body. |
| draft | Whether or not the release is a draft. |
| prs_created | Whether or not a pull request was created. |
| pr_number | Pull request number that created the release. |
| prs | Pull request numbers. |
| release-please | All outputs from release-please action as a JSON string. |
| raw | All outputs from release-please action as a JSON string. |
<!-- action-docs-outputs -->

View File

@@ -1,93 +1,92 @@
---
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.
author: "jimeh"
inputs:
token:
description: >-
GitHub token used to authenticate.
required: false
description: "GitHub token used to authenticate."
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-id:
installation-retrieval-mode:
description: >-
ID of the installation for which the app token will be requested. Defaults
to the ID of the repository's installation.
When using app authentication, the mode used to retrieve the installation
for which the token will be requested. For more information, see:
https://github.com/tibdex/github-app-token/blob/v2/action.yml
default: repository
installation-retrieval-payload:
description: >-
When using app authentication, the payload used to retrieve the
installation. For more information, see:
https://github.com/tibdex/github-app-token/blob/v2/action.yml
default: ${{ github.repository }}
repositories:
description: >-
When using app authentication, the JSON-stringified array of the full names
of the repositories the token should have access to. Defaults to all
repositories that the installation can access. See
https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#create-an-installation-access-token-for-an-app's
`repositories`.
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
description: >-
Configure github API URL. Default `https://api.github.com`
default: ${{ github.api_url }}
github-graphql-url:
description: >-
Configure github GraphQL URL. Default `https://api.github.com/graphql`
default: ${{ github.graphql_url }}
repository:
description: >-
The full name of the repository to operate on in owner/repo format.
Defaults to the current repository.
default: ${{ github.repository }}
default-branch:
target-branch:
description: >-
Branch to open pull release PR against. Defaults to the repository's
default branch.
required: false
default: ""
target-branch-pattern:
description: >-
Regular expression pattern to determine if current ref name is a target
branch or not. When specified, the action will only run if the current
ref name matches the pattern, and the current ref name will be used as the
target branch. When not specified, the action will always run, and target
the specified target-branch, or the repository's default branch if
target-branch is not specified.
default: ""
config-file:
description: Pat to config file within the project.
required: false
description: Path to config file within the project.
default: ".github/release-please-config.json"
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:
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 }}
html_url:
description: "Release URL."
value: ${{ steps.release-please.outputs.html_url }}
tag_name:
description: "Release tag name."
value: ${{ steps.release-please.outputs.tag_name }}
version:
description: "Version that was released."
value: ${{ steps.release-please.outputs.version }}
@@ -100,48 +99,96 @@ outputs:
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 }}
sha:
description: "Release SHA."
value: ${{ steps.release-please.outputs.sha }}
pr:
description: "Pull request number."
value: ${{ steps.release-please.outputs.pr }}
path:
description: "Path that was released."
value: ${{ steps.release-please.outputs.path }}
releases_created:
description: "Whether or not a release was created."
value: ${{ steps.release-please.outputs.releases_created }}
paths_released:
description: "Paths that were released."
value: ${{ steps.release-please.outputs.paths_released }}
id:
description: "Release ID."
value: ${{ steps.release-please.outputs.id }}
name:
description: "Release name."
value: ${{ steps.release-please.outputs.name }}
body:
description: "Release body."
value: ${{ steps.release-please.outputs.body }}
draft:
description: "Whether or not the release is a draft."
value: ${{ steps.release-please.outputs.draft }}
prs_created:
description: "Whether or not a pull request was created."
value: ${{ steps.release-please.outputs.prs_created }}
pr_number:
description: "Pull request number that created the release."
value: ${{ steps.release-please.outputs.prNumber }}
prs:
description: "Pull request numbers."
value: ${{ steps.release-please.outputs.prs }}
release-please:
raw:
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@v1
if: inputs.app-id != null && inputs.app-id != ''
- name: prepare
shell: bash
id: prepare
run: |
if [[ -n "$TARGET_BRANCH_PATTERN" ]]; then
if [[ "$GITHUB_REF_NAME" =~ $TARGET_BRANCH_PATTERN ]]; then
RUN="true"
TARGET="$GITHUB_REF_NAME"
fi
else
RUN="true"
fi
echo "target_branch=${TARGET:-$TARGET_BRANCH}" >> "$GITHUB_OUTPUT"
echo "run=${RUN:-false}" >> "$GITHUB_OUTPUT"
env:
TARGET_BRANCH: "${{ inputs.target-branch }}"
TARGET_BRANCH_PATTERN: "${{ inputs.target-branch-pattern }}"
- uses: tibdex/github-app-token@v2
if: steps.prepare.outputs.run == 'true' && inputs.app-id != null && inputs.app-id != ''
id: github-app-token
with:
app_id: ${{ inputs.app-id }}
installation_id: ${{ inputs.installation-id }}
github_api_url: ${{ inputs.github-api-url }}
installation_retrieval_mode: ${{ inputs.installation-retrieval-mode }}
installation_retrieval_payload: ${{ inputs.installation-retrieval-payload }}
permissions: ${{ inputs.permissions }}
private_key: ${{ inputs.private-key }}
repository: ${{ github.repository }}
- name: Determine which token to use
repositories: ${{ inputs.repositories }}
revoke: true
- name: resolve token
if: steps.prepare.outputs.run == 'true'
id: token
shell: bash
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@v3
- uses: googleapis/release-please-action@v4
if: steps.prepare.outputs.run == 'true'
id: release-please
with:
command: manifest
token: ${{ steps.token.outputs.token }}
default-branch: ${{ inputs.default-branch }}
target-branch: ${{ steps.prepare.outputs.target_branch }}
config-file: ${{ inputs.config-file }}
manifest-file: ${{ inputs.manifest-file }}
github-api-url: ${{ inputs.github-api-url }}
github-graphql-url: ${{ inputs.github-api-url }}
github-graphql-url: ${{ inputs.github-graphql-url }}
repo-url: ${{ inputs.repository }}