Skip to content

Publish new version of package #2

Publish new version of package

Publish new version of package #2

Workflow file for this run

name: Publish new version of package
on:
workflow_dispatch:
inputs:
version-type:
type: choice
required: true
default: patch
description: New version type
options:
- major
- minor
- patch
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout master branch with history for diffing
uses: actions/checkout@v3
with:
ref: 'refs/heads/master'
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
- name: Configure Git
run: |
git config user.name "cloudinary-bot"
git config user.email "[email protected]"
- name: Install dependencies
run: npm ci
- name: Bump version
run: npm version ${{ github.event.inputs.version-type }} -m "Bumping to version %s" --tag-version-prefix=""
- name: Build
shell: bash
run: npm run build
- name: Publish packages
run: npm publish --access="public"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Push changes
run: git push --tags --set-upstream origin master --force