Skip to content

Add 3space (#1202)

Add 3space (#1202) #88

name: Publish Release
on:
push:
branches: [master]
jobs:
is-release:
# release merge commits come from github-actions
if: startsWith(github.event.commits[0].author.name, 'github-actions')
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 }}