-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5676d14
commit 80ed1a3
Showing
4 changed files
with
151 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Create Release Pull Request | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
base-branch: | ||
description: 'The base branch for git operations and the pull request.' | ||
default: 'master' | ||
required: true | ||
release-type: | ||
description: 'A SemVer version diff, i.e. major, minor, patch, prerelease etc. Mutually exclusive with "release-version".' | ||
required: false | ||
release-version: | ||
description: 'A specific version to bump to. Mutually exclusive with "release-type".' | ||
required: false | ||
|
||
jobs: | ||
create-release-pr: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
# This is to guarantee that the most recent tag is fetched. | ||
# This can be configured to a more reasonable value by consumers. | ||
fetch-depth: 0 | ||
# We check out the specified branch, which will be used as the base | ||
# branch for all git operations and the release PR. | ||
ref: ${{ github.event.inputs.base-branch }} | ||
- 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/action-create-release-pr@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
release-type: ${{ github.event.inputs.release-type }} | ||
release-version: ${{ github.event.inputs.release-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 |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Publish Release | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
|
||
jobs: | ||
is-release: | ||
# release merge commits come from GitHub user | ||
if: github.event.head_commit.committer.name == 'GitHub' | ||
outputs: | ||
IS_RELEASE: ${{ steps.is-release.outputs.IS_RELEASE }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: MetaMask/[email protected] | ||
id: is-release | ||
|
||
publish-release: | ||
permissions: | ||
contents: write | ||
if: needs.is-release.outputs.IS_RELEASE == 'true' | ||
runs-on: ubuntu-latest | ||
needs: is-release | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.sha }} | ||
- name: Get Node.js version | ||
id: nvm | ||
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc) | ||
- name: Setup Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ steps.nvm.outputs.NODE_VERSION }} | ||
- uses: MetaMask/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
publish-npm-dry-run: | ||
runs-on: ubuntu-latest | ||
needs: publish-release | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.sha }} | ||
- name: Dry Run Publish | ||
# omit npm-token token to perform dry run publish | ||
uses: MetaMask/[email protected] | ||
|
||
publish-npm: | ||
environment: npm-publish | ||
runs-on: ubuntu-latest | ||
needs: publish-npm-dry-run | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.sha }} | ||
- name: Publish | ||
uses: MetaMask/[email protected] | ||
with: | ||
npm-token: ${{ secrets.NPM_TOKEN }} |
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,9 @@ | ||
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [Unreleased] | ||
|
||
[Unreleased]: https://github.com/MetaMask/controllers/compare/v1.35.0...HEAD |
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