From 88abcb8dc65f4fab833dcc4976c355cbe945608f Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Fri, 5 May 2023 01:29:06 +0100 Subject: [PATCH] docs(readme): add todo and examples sections --- README.md | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 61 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b46026d..0a076d7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -# release-please-action +

+ release-please-action +

Composite [GitHub Action][1] which wraps [release-please-action][2] and [github-app-token][3] actions, with some opinionated default settings. @@ -9,8 +11,62 @@ Composite [GitHub Action][1] which wraps [release-please-action][2] and ## Features -- Makes it easy to run release-please as a GitHub App. -- Defaults to placing release place config and manifests within the `.github` +- Makes it easy to run release-please as a GitHub App, allowing checks to run on + Release Pull Requests. +- Defaults to placing release-please config and manifest within the `.github` folder in the repository root: - - `.release-please-manifest.json` -> `.github/release-please-manifest.json` - - `release-please-config.json` -> `.github/release-please-config.json` + - `.github/release-please-manifest.json` instead of + `.release-please-manifest.json`. + - `.github/release-please-config.json` instead of + `release-please-config.json`. + +## To-Do + +- [ ] Verify stability of this action. +- [ ] Setup CI releases using itself, so the action can be referred to with + `@v1` instead of `@main`. + +## Examples + +The below example assumes you have secrets already setup for the app ID and +private key. + +If you do not want to authenticate as a GitHub App, simply do not provide +`app-id` and `private-key` inputs. + +```yaml +on: push +jobs: + release-please: + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' + steps: + - uses: jimeh/release-please-action@main + with: + app-id: ${{ secrets.RELEASE_BOT_APP_ID }} + private-key: ${{ secrets.RELEASE_BOT_PRIVATE_KEY }} + command: manifest +``` + +The above, is equivalent to: + +```yaml +on: push +jobs: + release-please: + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' + steps: + - uses: tibdex/github-app-token@v1 + 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 + 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 +```