mirror of
https://github.com/jimeh/release-please-manifest-action.git
synced 2026-02-19 09:06:42 +00:00
Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5a9880757d | ||
|
9d21ba2763
|
|||
|
4d6baa6f81
|
|||
|
|
1d94b44003 | ||
|
8634e410ba
|
|||
|
04d3b1edbb
|
|||
|
c2d85862fd
|
|||
|
b60e27befe
|
|||
|
a056b80ec3
|
|||
|
|
4205a83fff | ||
|
e012dc88b9
|
|||
|
|
1255f9741b | ||
|
77312c11a9
|
|||
|
|
ccc95c2796 | ||
|
08e227b305
|
|||
| ce1e3289db | |||
|
|
16c6b2e235 | ||
|
b93407b78f
|
3
.github/.release-please-manifest.json
vendored
Normal file
3
.github/.release-please-manifest.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
".": "0.1.0"
|
||||
}
|
||||
3
.github/release-please-manifest.json
vendored
3
.github/release-please-manifest.json
vendored
@@ -1,3 +0,0 @@
|
||||
{
|
||||
".": "0.0.1"
|
||||
}
|
||||
40
.github/workflows/ci.yml
vendored
40
.github/workflows/ci.yml
vendored
@@ -9,33 +9,17 @@ jobs:
|
||||
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:
|
||||
app-id: ${{ secrets.RELEASE_BOT_APP_ID }}
|
||||
private-key: ${{ secrets.RELEASE_BOT_PRIVATE_KEY }}
|
||||
- uses: actions/checkout@v3
|
||||
if: ${{ steps.release.outputs.release_created }}
|
||||
- name: Get GitHub App token
|
||||
if: ${{ steps.release.outputs.release_created }}
|
||||
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 }}
|
||||
- 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://${APP_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"
|
||||
tag_name: v${{ steps.release.outputs.major }}
|
||||
env:
|
||||
APP_TOKEN: ${{ steps.github-app-token.outputs.token }}
|
||||
MAJOR_TAG: v${{ steps.release.outputs.major }}
|
||||
MINOR_TAG: v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}
|
||||
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 }}
|
||||
|
||||
52
CHANGELOG.md
52
CHANGELOG.md
@@ -1,5 +1,57 @@
|
||||
# Changelog
|
||||
|
||||
## [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)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **release:** create major and minor version tags ([b93407b](https://github.com/jimeh/release-please-manifest-action/commit/b93407b78f3b3f59c67aed1dd64b196fb180a591))
|
||||
|
||||
## 0.0.1 (2023-05-07)
|
||||
|
||||
|
||||
|
||||
50
README.md
50
README.md
@@ -40,11 +40,15 @@ running [release-please][] in [manifest mode][].
|
||||
- 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-manifest.json`
|
||||
- `.github/release-please-config.json`
|
||||
|
||||
# Examples
|
||||
|
||||
All examples here assume you have places your `release-please-config.json` and
|
||||
`.release-please-manifest.json` within the `.github` folder in the root of the
|
||||
repository.
|
||||
|
||||
## Basic (Actions Token)
|
||||
|
||||
This example will have release-please authenticate using `secrets.GITHUB_TOKEN`
|
||||
@@ -66,7 +70,7 @@ 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
|
||||
```
|
||||
@@ -81,14 +85,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
|
||||
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,7 +116,7 @@ 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
|
||||
with:
|
||||
@@ -129,7 +133,7 @@ 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
|
||||
id: release-please
|
||||
@@ -137,7 +141,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._
|
||||
@@ -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,7 +176,7 @@ 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
|
||||
with:
|
||||
@@ -190,7 +194,7 @@ 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
|
||||
id: github-app-token
|
||||
@@ -203,7 +207,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 +220,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 -->
|
||||
|
||||
|
||||
@@ -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