Skip to content

Rebranding of Newscrypto to Numerico (#1352) #159

Rebranding of Newscrypto to Numerico (#1352)

Rebranding of Newscrypto to Numerico (#1352) #159

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/action-is-release@v1.0
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/action-publish-release@v2.0.0
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/action-npm-publish@v1.1.0
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/action-npm-publish@v1.1.0
with:
npm-token: ${{ secrets.NPM_TOKEN }}