Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 22 additions & 18 deletions .github/workflows/npm-publish.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,34 @@
name: Publish Package to npm
name: Publish ibm-segment

on:
push:
tags:
- 'v*'
branches:
- github-actions

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
persist-credentials: true

- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
registry-url: 'https://registry.npmjs.org/'
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: "18.x"
registry-url: "https://registry.npmjs.org"

- name: Install dependencies
run: npm ci
- run: npm ci

- name: Build
run: npm run build
# increment the patch version and commit the change
- name: Bump version and push
run: |
git config user.name github-actions
git config user.email github-actions@github.com
npm version patch -m "chore: bump version to %s"
git push

- name: Publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ibm-segment",
"version": "1.1.5",
"version": "1.1.8",
"type": "module",
"description": "",
"main": "dist/index.js",
Expand Down