Skip to content

Publish Pre Release

Publish Pre Release #1

name: Publish Pre Release
on:
workflow_dispatch:
inputs:
version:
description: "The version to publish on the form of x.x.x-pre.x"
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: "https://registry.npmjs.org"
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Set Git Config
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
- name: Publish to npm
run: npm version ${{ inputs.version }} && npm publish --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}