Skip to content

chore(master): release 2.0.0 #14

chore(master): release 2.0.0

chore(master): release 2.0.0 #14

Workflow file for this run

name: Publish beta package
on:
pull_request:
branches:
- master
jobs:
release:
runs-on: ubuntu-latest
# Only run this job if the PR is from a trusted collaborator (i.e. not a fork)
if: github.event.pull_request.head.repo.full_name == github.repository
env:
CEREBRUM_NPM_TOKEN: ${{ secrets.CEREBRUM_NPM_TOKEN }}
steps:
# Checkout project repository
- name: Checkout
uses: actions/[email protected]
# Setup Node.js environment
- name: Setup Node.js
uses: actions/setup-node@v2
with:
registry-url: https://registry.npmjs.org/
node-version: 16
# Use a cache for dependencies
- uses: actions/[email protected]
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
# Install dependencies so that prepublish scripts work as expected
- name: Install deps
run: npm i
# Update package version to a beta release, including the git commit sha
- name: Bump package.json
run: |
npm --no-git-tag-version version $(npm show . version)-beta.dangerous.$(git rev-parse --short HEAD)
# Publish version to npm
- name: Publish beta package
run: npm publish --tag beta
env:
NODE_AUTH_TOKEN: ${{ secrets.CEREBRUM_PUBLISH_NPM_TOKEN }}