Skip to content

Merge pull request #14 from MadhushaPrasad/feature/dev #2

Merge pull request #14 from MadhushaPrasad/feature/dev

Merge pull request #14 from MadhushaPrasad/feature/dev #2

Workflow file for this run

name: Release vue3-analog-clock
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+' # Matches tags like v1.2.3
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 12
uses: actions/setup-node@v2
with:
node-version: 12
registry-url: https://registry.npmjs.org
- name: Install dependencies
run: npm install
- name: Extract version from tag
id: extract_version
run: echo ##v | cut -d 'v' -f 2 # Extracts version from tag (vX.X.X)
- name: Update package.json version
run: npm version ${{ steps.extract_version.outputs.version }}
- name: Login to npm
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" >> .npmrc
- name: Publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}