-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (59 loc) · 2.03 KB
/
release-pull-request.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
57
58
59
60
61
62
63
name: MDC Release (Pull Request)
# This workflow creates or updates (if already exists) a pull request with new
# version bump on every commit to master.
on:
push:
branches:
- master
paths:
- "packages/**/*.ts"
- "packages/**/*.scss"
- "**/package*.json"
- "**/.npmignore"
- "**/*.md"
jobs:
release-pull-request:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v2
with:
ref: master
fetch-depth: 0
- name: Fetch all tags
run: |
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: 14
registry-url: https://registry.npmjs.org/
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: |
npm ci --ignore-scripts
npm run bootstrap
- name: Bump version
run: |
npx lerna version --conventional-commits --no-git-tag-version --no-push --yes
- name: Create PR
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "chore: Release"
author: Material Web Team <material-web-action@google.com>
title: "chore: Release"
body: |
This PR was opened by [release][1] GitHub action.
When you're ready to do a release, you can merge this and release
action will automatically publishes to npm registry.
If you're not ready to do a release yet, that's fine, whenever you
add more commits to master, this PR will be updated.
[1]: http://github.com/material-components/material-components-web/tree/master/.github/workflows/release-pull-request.yml
branch: chore/release