Skip to content
This repository was archived by the owner on Aug 15, 2024. It is now read-only.

Commit 9cf05a0

Browse files
authored
feat!: v4 release (#871)
Any advanced configuration should be done via a release-please-config.json. Fixes #859 Fixes #858 Fixes #857 Fixes #852 feat!: remove most configuration options in favor of manifest configuration to configure the release-please-action refactor!: rewrite in typescript feat!: remove command option in favor of setting `release-type` and `skip-github-release`/`skip-github-pull-request` feat!: run on node20 deps!: upgrade release-please to v16
1 parent 1ddb669 commit 9cf05a0

15 files changed

+4473
-3237
lines changed

.eslintignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
**/node_modules
2+
**/coverage
3+
test/fixtures
4+
build/
5+
docs/
6+
protos/
7+
samples/generated/
8+
dist/

.eslintrc.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"extends": "./node_modules/gts",
3+
"root": true,
4+
"overrides": [
5+
{
6+
"files": "test/*.ts",
7+
"rules": {
8+
"node/no-unpublished-import": 0
9+
}
10+
}
11+
]
12+
}

.github/workflows/ci.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,19 @@ jobs:
99
runs-on: ubuntu-latest
1010
strategy:
1111
matrix:
12-
node: [18, 20]
12+
node: [20]
1313
steps:
1414
- uses: actions/checkout@v2
1515
- uses: actions/setup-node@v1
1616
with:
1717
node-version: ${{ matrix.node }}
18-
- run: node --version
1918
# The first installation step ensures that all of our production
2019
# dependencies work on the given Node.js version, this helps us find
2120
# dependencies that don't match our engines field:
2221
- run: npm install --production --engine-strict --ignore-scripts --no-package-lock
2322
# Clean up the production install, before installing dev/production:
2423
- run: rm -rf node_modules
25-
- run: npm install
24+
- run: npm ci
2625
- run: npm test
2726
windows:
2827
runs-on: windows-latest
@@ -31,13 +30,13 @@ jobs:
3130
- uses: actions/setup-node@v1
3231
with:
3332
node-version: 20
34-
- run: npm install
33+
- run: npm ci
3534
- run: npm test
3635
build-dist:
3736
runs-on: ubuntu-latest
3837
strategy:
3938
matrix:
40-
node: [18, 20]
39+
node: [20]
4140
steps:
4241
- uses: actions/checkout@v2
4342
- uses: actions/setup-node@v1

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
coverage
22
node_modules
33
.DS_Store
4+
build/

README.md

Lines changed: 214 additions & 236 deletions
Large diffs are not rendered by default.

action.yml

Lines changed: 17 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -6,58 +6,16 @@ inputs:
66
description: 'GitHub token for creating and grooming release PRs, defaults to using secrets.GITHUB_TOKEN'
77
required: false
88
default: ${{ github.token }}
9-
fork:
10-
description: 'should the PR be proposed from a fork, Default to false'
11-
required: false
12-
default: false
13-
clean:
14-
description: 'Should stale release PRs be closed post release? Defaults to true'
15-
required: false
16-
default: true
17-
package-name:
18-
description: 'name of the distributions releases are being created for, e.g., "name" in package.json, or "setup.py"'
19-
required: false
209
release-type:
2110
description: 'what type of release is this, one of (ruby, python, node, terraform-module)'
22-
required: true
23-
bump-minor-pre-major:
24-
description: 'should breaking changes before 1.0.0 produce minor bumps'
25-
required: false
26-
default: false
27-
bump-patch-for-minor-pre-major:
28-
description: 'should feat changes before 1.0.0 produce patch bumps instead of minor bumps'
2911
required: false
30-
default: false
12+
default: ''
3113
path:
3214
description: "create a release from a path other than the repository's root"
3315
required: false
3416
default: ''
35-
changelog-path:
36-
description: 'specify a CHANGELOG path other than the root CHANGELOG.md'
37-
required: false
38-
default: ''
39-
changelog-host:
40-
description: 'The proto://host where commits live.'
41-
required: false
42-
default: ${{ github.server_url }}
43-
command:
44-
description: 'release-please command to run, either "github-release", or "release-pr" (defaults to running both)'
45-
required: false
46-
default: ''
47-
version-file:
48-
description: 'provide a path to a version file to increment (used by ruby releaser)'
49-
required: false
50-
default: ''
51-
extra-files:
52-
description: 'extra files to bump using the generic updater'
53-
required: false
54-
default: ''
55-
default-branch:
56-
description: 'branch to open pull release PR against (detected by default)'
57-
required: false
58-
default: ''
59-
changelog-types:
60-
description: 'changlelog commit types'
17+
target-branch:
18+
description: branch to open pull release PR against (detected by default)
6119
required: false
6220
default: ''
6321
config-file:
@@ -68,10 +26,10 @@ inputs:
6826
description: 'where can the manifest file be found in the project?'
6927
required: false
7028
default: ''
71-
signoff:
72-
description: 'Add [`Signed-off-by`](https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---signoff) line at the end of the commit log message using the user and email provided. (format "Name \<[email protected]\>")'
29+
repo-url:
30+
description: 'configure github repository URL. Default `process.env.GITHUB_REPOSITORY`'
7331
required: false
74-
default: ''
32+
default: ${{ github.repository }}
7533
github-api-url:
7634
description: 'configure github API URL. Default `https://api.github.com`'
7735
required: false
@@ -80,93 +38,22 @@ inputs:
8038
description: 'configure github GraphQL URL. Default `https://api.github.com`'
8139
required: false
8240
default: ${{ github.graphql_url }}
83-
repo-url:
84-
description: 'configure github repository URL. Default `process.env.GITHUB_REPOSITORY`'
85-
required: false
86-
default: ''
87-
monorepo-tags:
88-
description: 'add prefix to tags and branches, allowing multiple libraries to be released from the same repository'
41+
fork:
42+
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)'
8943
required: false
9044
default: false
91-
pull-request-title-pattern:
92-
description: 'add title pattern to make release PR, defaults to using "chore${scope}: release${component} ${version}"'
93-
required: false
94-
pull-request-header:
95-
description: 'set release PR header, defaults to using ":robot: I have created a release *beep* *boop*"'
96-
required: false
97-
draft:
98-
description: 'mark release as a draft'
99-
required: false
100-
draft-pull-request:
101-
description: 'mark pull request as a draft'
102-
required: false
103-
changelog-notes-type:
104-
description: "Strategy for building the changelog contents(see https://github.com/googleapis/release-please/blob/main/docs/customizing.md#changelog-types). Default `default`. Called `changelog-type` in release-please documentation."
105-
required: false
106-
versioning-strategy:
107-
description: 'Override method of determining SemVer version bumps based on commits (drr https://github.com/googleapis/release-please/blob/main/docs/customizing.md#versioning-strategies). Default `default`'
108-
required: false
109-
release-as:
110-
description: 'manually set version to this value, ignoring conventional commits. Absence defaults to conventional commits derived next version. Once the release PR is merged you should either remove this or update it to a higher version. Otherwise subsequent `manifest-pr` runs will continue to use this version even though it was already set in the last release.'
45+
proxy-server:
46+
description: 'set proxy sever when you run this action behind a proxy. format is host:port e.g. proxy-host.com:8080'
11147
required: false
48+
default: ''
11249
skip-github-release:
113-
description: 'Skip creating GitHub Releases. Default `false`'
114-
required: false
115-
prerelease:
116-
description: 'If set, create releases that are pre-major or pre-release version marked as pre-release on Github. Defaults `false`'
117-
required: false
118-
component:
119-
description: 'name of the component used for branch naming and release tagging, defaults to a normalized version based on the package name'
120-
required: false
121-
include-v-in-tag:
122-
description: 'include "v" in tag versions. Default `true`'
123-
required: false
124-
tag-separator:
125-
description: 'configures separator character used in release tag'
126-
required: false
127-
snapshot-labels:
128-
description: 'sets java snapshot pull request labels other than `autorelease: snapshot` '
129-
required: false
130-
bootstrap-sha:
131-
description: 'if this is the first time running `manifest-pr` on a repo this key will limit how far back (exclusive) to pull commits for conventional commit parsing (see the manifest releaser docs https://github.com/googleapis/release-please/blob/main/docs/manifest-releaser.md)'
132-
required: false
133-
last-release-sha:
134-
description: 'overrides the commit sha release-please will use from which to gather commits for the current release (see the manifest releaser docs https://github.com/googleapis/release-please/blob/main/docs/manifest-releaser.md)'
50+
description: 'if set to true, then do not try to tag releases'
13551
required: false
136-
always-link-local:
137-
description: 'when using the `node-workspace` plugin, setting to false will only bump your local dependencies within the SemVer range (see the manifest releaser docs)[https://github.com/googleapis/release-please/blob/main/docs/manifest-releaser.md) . Default `true`.'
138-
required: false
139-
separate-pull-requests:
140-
description: 'create separate pull requests for each package instead of a single manifest release pull request (see the manifest releaser docs https://github.com/googleapis/release-please/blob/main/docs/manifest-releaser.md). Default `false`.'
141-
required: false
142-
plugins:
143-
description: 'see https://github.com/googleapis/release-please/blob/main/docs/manifest-releaser.md#plugins'
144-
required: false
145-
labels:
146-
description: 'list of labels to apply to the release pull requests, defaults to `autorelease: pending`'
147-
required: false
148-
release-labels:
149-
description: 'set a pull request label other than `autorelease: tagged`'
150-
required: false
151-
skip-labeling:
152-
description: 'if set, labels will not be applied to pull requests. Default `false`.'
153-
required: false
154-
sequential-calls:
155-
description: 'issue GitHub API requests sequentially rather than concurrently (see the manifest releaser docs https://github.com/googleapis/release-please/blob/main/docs/manifest-releaser.md). Default `false`'
156-
required: false
157-
group-pull-request-title-pattern:
158-
description: 'sets the manifest pull request title for when releasing multiple packages grouped together in the one pull request'
159-
required: false
160-
release-search-depth:
161-
description: 'when searching for the latest release SHAs, only consider the last N releases'
162-
required: false
163-
commit-search-depth:
164-
description: 'when fetching the list of commits to consider, only consider the last N commits'
165-
required: false
166-
proxy-server:
167-
description: 'set proxy sever when you run this action behind a proxy. format is host:port e.g. proxy-host.com:8080'
52+
default: false
53+
skip-github-pull-request:
54+
description: 'if set to true, then do not try to open pull requests'
16855
required: false
169-
56+
default: false
17057
runs:
171-
using: 'node16'
58+
using: 'node20'
17259
main: 'dist/index.js'

0 commit comments

Comments
 (0)