8 Commits

Author SHA1 Message Date
0cdb51c5bb chore(deps)!: upgrade dependant actions to new major versions
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
2024-02-26 19:31:44 +00: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
7 changed files with 107 additions and 69 deletions

View File

@@ -1,3 +1,3 @@
{
".": "1.0.1"
".": "1.0.2"
}

33
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
---
name: Release
on: push
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- 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'
steps:
- uses: jimeh/release-please-manifest-action@v1
id: release
with:
app-id: ${{ secrets.RELEASE_BOT_APP_ID }}
private-key: ${{ secrets.RELEASE_BOT_PRIVATE_KEY }}
- name: MAJOR and MAJOR.MINOR tags
if: ${{ steps.release.outputs.release_created }}
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,27 +0,0 @@
---
name: Release
on:
push:
branches:
- main
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: jimeh/release-please-manifest-action@main
id: release
- name: Create/update MAJOR tag
if: ${{ steps.release.outputs.release_created }}
uses: richardsimko/update-tag@v1
with:
tag_name: v${{ steps.release.outputs.major }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create/update MAJOR.MINOR tag
if: ${{ steps.release.outputs.release_created }}
uses: richardsimko/update-tag@v1
with:
tag_name: v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,5 +1,12 @@
# Changelog
## [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)

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

View File

@@ -221,18 +221,21 @@ _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-retrieval-mode | 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 | `false` | repository |
| installation-retrieval-payload | The payload used to retrieve the installation. | `false` | ${{ github.repository }} |
| 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 }} |
| target-branch | branch to open pull release PR against (detected by default) | `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 |
| path | create a release from a path other than the repository's root | `false` | |
| fork | 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) | `false` | false |
| proxy-server | Set proxy sever when you run this action behind a proxy. Format is host:port e.g. proxy-host.com:8080 | `false` | |
<!-- action-docs-inputs -->
@@ -247,7 +250,7 @@ _Note: Outputs are not included in this equivalence example._
| id | Release ID. |
| name | Release name. |
| tag_name | Release tag name. |
| sha | Release sha |
| sha | Release SHA. |
| body | Release body. |
| html_url | Release URL. |
| draft | Whether or not the release is a draft. |

View File

@@ -4,13 +4,11 @@ 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.
description: "GitHub token used to authenticate."
required: false
default: ${{ github.token }}
default: "${{ github.token }}"
app-id:
description: >-
ID of the GitHub App to use for authentication. If set, takes precedence
@@ -21,38 +19,53 @@ inputs:
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.
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.
description: "Configure github API URL."
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.
default: ${{ github.repository }}
default-branch:
description: >-
Branch to open pull release PR against. Defaults to the repository's
default branch.
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.
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.
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:
@@ -71,7 +84,7 @@ outputs:
description: "Release tag name."
value: ${{ steps.release-please.outputs.tag_name }}
sha:
description: "Release sha"
description: "Release SHA."
value: ${{ steps.release-please.outputs.sha }}
body:
description: "Release body."
@@ -116,17 +129,17 @@ outputs:
runs:
using: "composite"
steps:
- uses: tibdex/github-app-token@v1
- 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_id: ${{ inputs.installation-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 }}
repository: ${{ github.repository }}
- name: Determine which token to use
- name: resolve token
id: token
run: |-
echo "token=${APP_TOKEN:-$INPUT_TOKEN}" >> "$GITHUB_OUTPUT"
@@ -134,14 +147,16 @@ runs:
APP_TOKEN: "${{ steps.github-app-token.outputs.token }}"
INPUT_TOKEN: "${{ inputs.token }}"
shell: bash
- uses: google-github-actions/release-please-action@v3
- uses: google-github-actions/release-please-action@v4
id: release-please
with:
command: manifest
token: ${{ steps.token.outputs.token }}
default-branch: ${{ inputs.default-branch }}
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 }}