Skip to content

Release

Release #1

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
dryRun:
description: 'View list of files that will be published before the real release'
required: true
default: 'true' ## Dry run
release:
# This specifies that the build will be triggered when we publish a release
types: [published]
jobs:
build:
name: Release package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: ⚙ Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
# - name: 🔥 Run Tests
# run: npm test
- name: 📦 Dry Run
if: github.event.inputs.dryRun == 'true'
run: npm publish --dry-run
# If you want to publish to NPM, make sure to put your NPM token to repository settings
- name: 📦 Publish Packages
if: github.event.inputs.dryRun != 'true'
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}