-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use release please manifest configuration (#164)
- Loading branch information
1 parent
e5d3d0e
commit 95118ec
Showing
20 changed files
with
339 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,4 +29,4 @@ | |
] | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
".": "3.6.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"separate-pull-requests": true, | ||
"changelog-sections": [ | ||
{"type":"feat","section":"Features","hidden":false}, | ||
{"type":"fix","section":"Bug Fixes","hidden":false}, | ||
{"type":"docs","section":"Documentation","hidden":false}, | ||
{"type":"deps","section":"Dependencies","hidden":false}, | ||
{"type":"chore","hidden":true} | ||
], | ||
"packages": { | ||
"{{#unless pkgRelPath}}.{{/unless}}{{pkgRelPath}}": {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"{{#unless pkgRelPath}}.{{/unless}}{{pkgRelPath}}": "{{pkg.version}}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,47 @@ | ||
name: Release Please {{~#if isWorkspace}} - {{pkgName}}{{/if}} | ||
name: Release Please | ||
|
||
on: | ||
push: | ||
{{#if pkgRelPath}} | ||
paths: | ||
- {{pkgRelPath}}/** | ||
{{/if}} | ||
branches: | ||
{{#each branches}} | ||
- {{.}} | ||
{{/each}} | ||
|
||
{{#if isWorkspace}} | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
{{/if}} | ||
|
||
jobs: | ||
release-please: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
prs: $\{{ steps.release.outputs.prs }} | ||
steps: | ||
- uses: google-github-actions/release-please-action@v3 | ||
id: release | ||
with: | ||
release-type: node | ||
{{#if pkgRelPath}} | ||
monorepo-tags: true | ||
path: {{pkgRelPath}} | ||
# name can be removed after this is merged | ||
# https://github.com/google-github-actions/release-please-action/pull/459 | ||
package-name: "{{pkgName}}" | ||
{{/if}} | ||
changelog-types: > | ||
[ | ||
{{#each changelogTypes}} | ||
{{{json .}}}{{#unless @last}},{{/unless}} | ||
{{/each}} | ||
] | ||
{{#if isWorkspace}} | ||
command: manifest | ||
|
||
update-prs: | ||
needs: release-please | ||
if: needs.release-please.outputs.prs | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
pr: $\{{ fromJSON(needs.release-please.outputs.prs) }} | ||
steps: | ||
{{> setupGit}} | ||
{{> setupNode}} | ||
- name: Update package-lock.json and commit | ||
- name: Update PR $\{{ matrix.pr.number }} dependencies and commit | ||
if: steps.release.outputs.pr | ||
env: | ||
GITHUB_TOKEN: $\{{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
gh pr checkout $\{{ fromJSON(steps.release.outputs.pr).number }} | ||
gh pr checkout $\{{ matrix.pr.number }} | ||
npm run resetdeps | ||
title="$\{{ fromJSON(steps.release.outputs.pr).title }}" | ||
# get the version from the pr title | ||
# get everything after the last space | ||
git commit -am "deps: {{pkgName}}@${title##* }" | ||
title="$\{{ matrix.pr.title }}" | ||
# get the dependency spec from the pr title | ||
# get everything after ': release ' + replace space with @ | ||
dep_spec=$(echo "${title##*: release }" | tr ' ' @) | ||
git commit -am "deps: $dep_spec" | ||
git push | ||
{{/if}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"separate-pull-requests": true, | ||
"changelog-sections": [ | ||
{ | ||
"type": "feat", | ||
"section": "Features", | ||
"hidden": false | ||
}, | ||
{ | ||
"type": "fix", | ||
"section": "Bug Fixes", | ||
"hidden": false | ||
}, | ||
{ | ||
"type": "docs", | ||
"section": "Documentation", | ||
"hidden": false | ||
}, | ||
{ | ||
"type": "deps", | ||
"section": "Dependencies", | ||
"hidden": false | ||
}, | ||
{ | ||
"type": "chore", | ||
"hidden": true | ||
} | ||
], | ||
"packages": { | ||
".": {} | ||
} | ||
} |
Oops, something went wrong.