Skip to content

Create Release PR

Create Release PR #97

name: Create Release PR
on:
workflow_dispatch:
inputs:
base-branch:
description: 'The base branch for git operations and the pull request.'
default: 'main'
required: true
release-type:
description: 'A SemVer version diff, i.e. major, minor, or patch. 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@v4
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: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- uses: MetaMask/action-create-release-pr@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release-type: ${{ github.event.inputs.release-type }}
release-version: ${{ github.event.inputs.release-version }}
update-snap-version:
runs-on: ubuntu-latest
permissions:
contents: write
needs: create-release-pr
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Update Snap Version
id: update-release-pr
shell: bash
run: |
chmod +x ./scripts/update-release-pr.sh
./scripts/update-release-pr.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ENVIRONMENT: production
RPC_URL_MAINNET_LIST: ${{ secrets.RPC_URL_MAINNET_LIST }}
RPC_URL_DEVNET_LIST: ${{ secrets.RPC_URL_DEVNET_LIST }}
RPC_URL_TESTNET_LIST: ${{ secrets.RPC_URL_TESTNET_LIST }}
RPC_URL_LOCALNET_LIST: ${{ secrets.RPC_URL_LOCALNET_LIST }}
EXPLORER_BASE_URL: ${{ secrets.EXPLORER_BASE_URL }}
PRICE_API_BASE_URL: ${{ secrets.PRICE_API_BASE_URL }}
LOCAL_API_BASE_URL: ${{ secrets.LOCAL_API_BASE_URL }}
TOKEN_API_BASE_URL: ${{ secrets.TOKEN_API_BASE_URL }}
STATIC_API_BASE_URL: ${{ secrets.STATIC_API_BASE_URL }}
SECURITY_ALERTS_API_BASE_URL: ${{ secrets.SECURITY_ALERTS_API_BASE_URL }}