Skip to content

Commit e627677

Browse files
authored
Create create-release-pr.yml (MetaMask#134)
1 parent a21e073 commit e627677

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Create Release Pull Request
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
base-branch:
7+
description: 'The base branch for git operations and the pull request.'
8+
default: 'main'
9+
required: true
10+
release-type:
11+
description: 'A SemVer version diff, i.e. major, minor, patch, prerelease etc. Mutually exclusive with "release-version".'
12+
required: false
13+
release-version:
14+
description: 'A specific version to bump to. Mutually exclusive with "release-type".'
15+
required: false
16+
17+
jobs:
18+
create-release-pr:
19+
runs-on: ubuntu-latest
20+
permissions:
21+
contents: write
22+
pull-requests: write
23+
steps:
24+
- uses: actions/checkout@v2
25+
with:
26+
# This is to guarantee that the most recent tag is fetched.
27+
# This can be configured to a more reasonable value by consumers.
28+
fetch-depth: 0
29+
# We check out the specified branch, which will be used as the base
30+
# branch for all git operations and the release PR.
31+
ref: ${{ github.event.inputs.base-branch }}
32+
- name: Get Node.js version
33+
id: nvm
34+
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)
35+
- uses: actions/setup-node@v2
36+
with:
37+
node-version: ${{ steps.nvm.outputs.NODE_VERSION }}
38+
- uses: MetaMask/action-create-release-pr@v1
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
with:
42+
release-type: ${{ github.event.inputs.release-type }}
43+
release-version: ${{ github.event.inputs.release-version }}

0 commit comments

Comments
 (0)