Skip to content

Merge pull request #4 from tahsinature/node-implementation #28

Merge pull request #4 from tahsinature/node-implementation

Merge pull request #4 from tahsinature/node-implementation #28

Workflow file for this run

name: Node.js Package
on:
push:
branches:
- master
create:
tags:
- "*"
jobs:
create-tag:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"
- name: Install dependencies
run: npm ci
- name: Bump version and add -SNAPSHOT suffix
run: |
npm version prerelease --preid=SNAPSHOT
git add package.json
git commit -m "Bump version to $(node -p "require('./package.json').version")"
- name: Create and push tag
run: |
TAG_NAME=$(node -p "require('./package.json').version")
git tag $TAG_NAME
git push origin $TAG_NAME
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Push changes
run: git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}