-
Notifications
You must be signed in to change notification settings - Fork 17
/
release-please.yml
56 lines (53 loc) · 1.5 KB
/
release-please.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Release Please {{~#if isWorkspace}} - {{pkgName}}{{/if}}
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
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}}
{{> setupGit}}
{{> setupNode}}
- name: Update package-lock.json and commit
if: steps.release.outputs.pr
env:
GITHUB_TOKEN: $\{{ secrets.GITHUB_TOKEN }}
run: |
gh pr checkout $\{{ fromJSON(steps.release.outputs.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##* }"
git push
{{/if}}