Skip to content

Merge pull request #126 from Acurast/feat/cancel-deployment #82

Merge pull request #126 from Acurast/feat/cancel-deployment

Merge pull request #126 from Acurast/feat/cancel-deployment #82

Workflow file for this run

name: Publish Prod
on:
push:
branches:
- main
workflow_run:
workflows: ['Build']
types:
- completed
workflow_dispatch:
inputs:
target:
description: 'Publish prod'
required: true
default: 'prod'
type: choice
options:
- prod
jobs:
publish:
name: πŸš€ Publish to npm
runs-on: ubuntu-latest
if: github.event.inputs.target == 'prod' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v2
- name: βš™οΈ Set up Node.js ${{ env.node_version }}
uses: actions/setup-node@v2
with:
node-version: ${{ env.node_version }}
- name: πŸ”§ Install dependencies
run: npm ci
- name: πŸ—οΈ Build
run: npm run build
- name: πŸ” Authenticate to npm
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: πŸš€ Publish to npm
run: npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}