Skip to content
Merged
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: 26 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,27 @@ on:
jobs:
npm:
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
contents: read

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup node.js for NPM
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 14
node-version: 20
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'
scope: '@customerio'

- name: Install npm 11.5.1+ for OIDC support
run: npm install -g npm@latest

- name: Install
run: |
yarn install --frozen-lockfile
Expand All @@ -64,42 +71,45 @@ jobs:

- name: Publish (dry-run)
if: ${{ github.event.inputs.dry-run == 'true' }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
for package in core browser node; do
pushd packages/$package
npm publish --dry-run
npm publish --dry-run --access public
popd
done

- name: Publish
if: ${{ github.event.inputs.dry-run == 'false' }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
for package in core browser node; do
pushd packages/$package
npm publish
npm publish --access public
popd
done

github:
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
contents: read

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup node.js for GitHub
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 14
node-version: 20
cache: 'yarn'
registry-url: 'https://npm.pkg.github.com'
scope: '@customerio'

- name: Install npm 11.5.1+ for OIDC support
run: npm install -g npm@latest

- name: Install
run: |
yarn install --frozen-lockfile
Expand Down Expand Up @@ -148,11 +158,13 @@ jobs:

commit:
runs-on: ubuntu-latest
permissions:
contents: write

needs: [npm, github]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down Expand Up @@ -191,4 +203,4 @@ jobs:
if: ${{ github.event.inputs.dry-run == 'false' }}
run: |
git commit -am "Update version"
git push
git push
2 changes: 1 addition & 1 deletion packages/browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"terser-webpack-plugin": "^5.1.4",
"ts-loader": "^9.1.1",
"ts-node": "^10.8.0",
"webpack": "^5.36.1",
"webpack": "^5.95.0",
"webpack-bundle-analyzer": "^4.4.2",
"webpack-cli": "^4.8.0"
},
Expand Down
5 changes: 5 additions & 0 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"name": "@customerio/cdp-analytics-core",
"version": "0.3.8",
"repository": {
"type": "git",
"url": "https://github.com/customerio/cdp-analytics-js",
"directory": "packages/core"
},
"license": "MIT",
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
Expand Down
5 changes: 5 additions & 0 deletions packages/node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"name": "@customerio/cdp-analytics-node",
"version": "0.3.8",
"repository": {
"type": "git",
"url": "https://github.com/customerio/cdp-analytics-js",
"directory": "packages/node"
},
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
"types": "./dist/types/index.d.ts",
Expand Down
Loading