Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions workflow-templates/create-release-pr.properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "Create Release Pull Request Workflow",
"description": "Workflow template for creating a release pull request.",
"iconName": "metamask-fox",
"categories": [
"JavaScript",
"TypeScript"
],
"filePatterns": [
".nvmrc$",
"package.json$",
"CHANGELOG.md$"
]
}
19 changes: 19 additions & 0 deletions workflow-templates/create-release-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Create Release Pull Request

on: [create]

jobs:
release_pr:
if: ${{startsWith(github.ref, 'refs/heads/release-v')}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get Node.js version
id: nvm
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)
- uses: actions/setup-node@v2
with:
node-version: ${{ steps.nvm.outputs.NODE_VERSION }}
- uses: MetaMask/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions workflow-templates/metamask-fox.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions workflow-templates/publish-release.properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "Publish Release Workflow",
"description": "Workflow template for publishing a release when a release PR is merged.",
"iconName": "metamask-fox",
"categories": [
"JavaScript",
"TypeScript"
],
"filePatterns": [
".nvmrc$",
"package.json$",
"CHANGELOG.md$"
]
}
23 changes: 23 additions & 0 deletions workflow-templates/publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish Release

on:
pull_request:
types: [closed]

jobs:
release_merge:
if: |
github.event.pull_request.merged == true &&
startsWith(github.event.pull_request.head.ref, 'release-v')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get Node.js version
id: nvm
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)
- uses: actions/setup-node@v2
with:
node-version: ${{ steps.nvm.outputs.NODE_VERSION }}
- uses: MetaMask/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}