Skip to content

Enabling MetaMask security code scanner #79

Enabling MetaMask security code scanner

Enabling MetaMask security code scanner #79

Workflow file for this run

name: Publish Release
on:
pull_request:
types: [closed]
jobs:
publish-release:
permissions:
contents: write
if: |
github.event.pull_request.merged == true &&
startsWith(github.event.pull_request.head.ref, 'release/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# This is to guarantee that the most recent tag is fetched,
# which we need for updating the shorthand major version tag.
fetch-depth: 0
# We check out the release pull request's base branch, which will be
# used as the base branch for all git operations.
ref: ${{ github.event.pull_request.base.ref }}
- name: Get Node.js version
id: nvm
run: echo "NODE_VERSION=$(cat .nvmrc)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-node@v3
with:
node-version: ${{ steps.nvm.outputs.NODE_VERSION }}
- uses: MetaMask/action-publish-release@v1
id: publish-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update shorthand major version tag
run: |
./.github/workflows/scripts/update-major-version-tag.sh \
${{ steps.publish-release.outputs.release-version }}