Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create npm-publish.yml #3

Merged
merged 4 commits into from
Feb 19, 2024
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
33 changes: 33 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Node.js Package

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci
- run: npm test

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
6 changes: 3 additions & 3 deletions BUILD_TIME.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Build Time (Compilation Time)

Requires `@agoda-com/devfeedback` version 1.0.0 or later.
Requires `agoda-devfeedback` version 1.0.0 or later.

## Usage

Expand All @@ -11,7 +11,7 @@ Requires `@agoda-com/devfeedback` version 1.0.0 or later.
If you use **Webpack**, you can add the following to your `webpack.config.js` file:

```javascript
const { WebpackBuildStatsPlugin } = require('@agoda-com/devfeedback');
const { WebpackBuildStatsPlugin } = require('agoda-devfeedback');

module.exports = {
// ...
Expand All @@ -27,7 +27,7 @@ module.exports = {
If you use **Vite** you can add the following to your `vite.config.js` file:

```javascript
import { viteBuildStatsPlugin } from '@agoda-com/devfeedback';
import { viteBuildStatsPlugin } from 'agoda-devfeedback';

export default defineConfig({
// ...
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @agoda-com/devfeedback
# agoda-devfeedback

This is a JavaScript/TypeScript package to collect metrics that relate to developers' experience.

Expand All @@ -7,13 +7,13 @@ This is a JavaScript/TypeScript package to collect metrics that relate to develo
Install the package:

```bash
npm install --save-dev @agoda-com/devfeedback
npm install --save-dev agoda-devfeedback
```

or

```bash
yarn add --dev @agoda-com/devfeedback
yarn add --dev agoda-devfeedback
```

Please note that when an error happens, the package will put the error message to `devfeedback.log` file in the current working directory.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@agoda-com/devfeedback",
"name": "agoda-devfeedback",
"exports": {
"require": "./lib/cjs/index.js",
"import": "./lib/esm/index.js"
Expand Down
Loading