mirror of
https://github.com/jimeh/release-please-manifest-action.git
synced 2026-02-19 09:06:42 +00:00
Compare commits
1 Commits
v1.0
...
reusable-w
| Author | SHA1 | Date | |
|---|---|---|---|
|
715528c92e
|
2
.github/.release-please-manifest.json
vendored
2
.github/.release-please-manifest.json
vendored
@@ -1,3 +1,3 @@
|
||||
{
|
||||
".": "1.0.3"
|
||||
".": "1.0.1"
|
||||
}
|
||||
|
||||
34
.github/workflows/ci.yml
vendored
34
.github/workflows/ci.yml
vendored
@@ -1,34 +0,0 @@
|
||||
---
|
||||
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:
|
||||
# TOOD: Switch back to @v1 once once v1.0.3 is released.
|
||||
- uses: jimeh/release-please-manifest-action@main
|
||||
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 }}
|
||||
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 }}
|
||||
27
.github/workflows/release.yml
vendored
Normal file
27
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
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 }}
|
||||
14
CHANGELOG.md
14
CHANGELOG.md
@@ -1,19 +1,5 @@
|
||||
# Changelog
|
||||
|
||||
## [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)
|
||||
|
||||
|
||||
|
||||
7
Makefile
7
Makefile
@@ -1,10 +1,3 @@
|
||||
.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
|
||||
|
||||
@@ -247,7 +247,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. |
|
||||
|
||||
@@ -7,7 +7,8 @@ author: "jimeh"
|
||||
|
||||
inputs:
|
||||
token:
|
||||
description: "GitHub token used to authenticate."
|
||||
description: >-
|
||||
GitHub token used to authenticate.
|
||||
required: false
|
||||
default: ${{ github.token }}
|
||||
app-id:
|
||||
@@ -70,7 +71,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."
|
||||
@@ -125,7 +126,7 @@ runs:
|
||||
permissions: ${{ inputs.permissions }}
|
||||
private_key: ${{ inputs.private-key }}
|
||||
repository: ${{ github.repository }}
|
||||
- name: resolve token
|
||||
- name: Determine which token to use
|
||||
id: token
|
||||
run: |-
|
||||
echo "token=${APP_TOKEN:-$INPUT_TOKEN}" >> "$GITHUB_OUTPUT"
|
||||
@@ -133,7 +134,7 @@ runs:
|
||||
APP_TOKEN: "${{ steps.github-app-token.outputs.token }}"
|
||||
INPUT_TOKEN: "${{ inputs.token }}"
|
||||
shell: bash
|
||||
- uses: googleapis/release-please-action@v3
|
||||
- uses: google-github-actions/release-please-action@v3
|
||||
id: release-please
|
||||
with:
|
||||
command: manifest
|
||||
|
||||
Reference in New Issue
Block a user