Skip to content

Commit b1f049e

Browse files
Merge pull request #28 from customerio/feature/11709-npm-publish
Publish NPM package
2 parents 242e3c7 + 58af231 commit b1f049e

File tree

4 files changed

+81
-17
lines changed

4 files changed

+81
-17
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,7 @@ jobs:
4242
source_dir: 'dist'
4343
destination_dir: ${{ env.AWS_DEST }}
4444
endpoint: 'ams3.digitaloceanspaces.com'
45+
- name: Publish to NPM
46+
uses: JS-DevTools/npm-publish@v3
47+
with:
48+
token: ${{ secrets.NPM_TOKEN }}

.github/workflows/trigger-release.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Trigger a Gist Web Release
2+
run-name: Release gist-web
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
version:
8+
description: 'Semantic version change'
9+
required: true
10+
options:
11+
- 'patch'
12+
- 'minor'
13+
- 'major'
14+
default: 'patch'
15+
16+
jobs:
17+
release:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Use Node.js 16
21+
uses: actions/setup-node@v2
22+
with:
23+
node-version: 16
24+
- name: Checkout
25+
uses: actions/checkout@v3
26+
with:
27+
fetch-depth: 0
28+
ref: develop
29+
token: ${{ secrets.SRE_GHACTIONS_TOKEN }}
30+
- name: Increment package.json version
31+
uses: 'phips28/gh-action-bump-version@master'
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.SRE_GHACTIONS_TOKEN }}
34+
with:
35+
version-type: '${{ inputs.version }}'
36+
skip-tag: 'true'
37+
- name: Extract new npm version
38+
id: package-version
39+
uses: martinbeentjes/[email protected]
40+
- name: Release to master
41+
shell: bash
42+
env:
43+
GIT_AUTH_TOKEN: ${{ secrets.SRE_GHACTIONS_TOKEN }}
44+
run: |
45+
git pull origin develop
46+
git checkout master
47+
git merge develop
48+
git push origin master
49+
git tag ${{ steps.package-version.outputs.current-version }}
50+
git push origin ${{ steps.package-version.outputs.current-version }}
51+
52+

LICENSE

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
1-
Copyright (c) 2018-present, Bourbon Ltd. All rights reserved.
1+
The MIT License (MIT)
22

3-
You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
4-
copy, modify, and distribute this software in source code or binary form for use
5-
in connection with the web services and APIs provided by Bourbon Ltd.
3+
Copyright (c) 2023 Customer IO
64

7-
This copyright notice shall be included in all copies or substantial portions of the software.
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
814

915
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
10-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
11-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
12-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
13-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
14-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

package.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "@gistproduct/web",
3-
"version": "2.12.1",
4-
"description": "Build beautiful in-app flows with no code and deliver them instantly to your app.",
2+
"name": "customerio-gist-web",
3+
"version": "3.6.0",
4+
"description": "Build beautiful in-app flows with no code and deliver them instantly to your app. http://customer.io",
55
"private": false,
66
"browser": "dist/gist.min.js",
77
"scripts": {
@@ -10,7 +10,7 @@
1010
"watch:build": "webpack --watch --progress --mode=development",
1111
"watch:server": "http-server"
1212
},
13-
"author": "Bourbon Ltd",
13+
"author": "Customer.io (https://customer.io)",
1414
"license": "SEE LICENSE IN LICENSE",
1515
"devDependencies": {
1616
"html-loader": "^1.1.0",
@@ -25,7 +25,7 @@
2525
},
2626
"repository": {
2727
"type": "git",
28-
"url": "git+ssh://git@github.com:customerio/gist-web.git"
28+
"url": "git://github.com/customerio/gist-web.git"
2929
},
3030
"keywords": [
3131
"gist",
@@ -34,10 +34,11 @@
3434
"product",
3535
"messaging",
3636
"in-product",
37-
"gist.build"
37+
"gist.build",
38+
"customerio"
3839
],
3940
"bugs": {
4041
"url": "https://github.com/customerio/gist-web/issues"
4142
},
42-
"homepage": "https://docs.gist.build/libraries/web"
43+
"homepage": "https://github.com/customerio/gist-web"
4344
}

0 commit comments

Comments
 (0)