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

Fix npm package publish workflow #507

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
3b77d1f
update to use @ng-bootstrap
Mandrewdarts Sep 16, 2021
fb45696
setup github actions to publish to github packages
Mandrewdarts Sep 20, 2021
0dd35c0
npm run package :/
Mandrewdarts Sep 20, 2021
f69d162
publish dist/ngx-intl-tel-input
Mandrewdarts Sep 20, 2021
8ce13d4
remove contrib file and update publish config
Mandrewdarts Sep 20, 2021
fca3fca
Merge branch 'master' of https://github.com/travelnetsolutions/ngx-in…
Mandrewdarts Sep 20, 2021
ee0caf7
Merge branch 'master' into refactor/use-ng-bootstrap
Mandrewdarts Sep 20, 2021
3cd9aa4
Merge pull request #1 from travelnetsolutions/refactor/use-ng-bootstrap
Mandrewdarts Sep 20, 2021
db64b8b
update package name
Mandrewdarts Sep 20, 2021
30cbac2
update readme with tns specific setup
Mandrewdarts Oct 12, 2021
d19ca36
ng 12 upgrade
Mandrewdarts Nov 4, 2021
ccd23ec
closes on country select
Mandrewdarts Oct 7, 2022
1ca8b44
rm logs
Mandrewdarts Oct 7, 2022
39b8d15
up the version with the fix
Mandrewdarts Oct 7, 2022
29a897b
update package json
Mandrewdarts Oct 19, 2022
b86098b
revert
Mandrewdarts Oct 19, 2022
4b4316f
formatting
Mandrewdarts Oct 19, 2022
338e005
more formatting
Mandrewdarts Oct 19, 2022
8e58d64
even more formatting
Mandrewdarts Oct 19, 2022
5a294db
last formatting
Mandrewdarts Oct 19, 2022
2a23651
Merge pull request #2 from travelnetsolutions/mandrewdarts/close-on-c…
datasage Oct 21, 2022
bd38f59
downgrade ts version
Mandrewdarts Oct 21, 2022
836a10f
add pr build
Mandrewdarts Oct 21, 2022
4dc19f5
bump typescript
Mandrewdarts Oct 21, 2022
7adc3df
Merge pull request #3 from travelnetsolutions/fix/downgrade-typescrip…
datasage Oct 21, 2022
b6a393d
upgrades
Mandrewdarts Nov 23, 2022
4be23e4
Merge pull request #4 from travelnetsolutions/mandrewdarts/upgrade-ng…
datasage Nov 23, 2022
da73458
bump package version
Mandrewdarts Nov 23, 2022
c787d9d
Merge pull request #5 from travelnetsolutions/mandrewdarts/bump-version
datasage Nov 23, 2022
b393148
Upgraded dependencies for Angular 17x
cmathistns May 8, 2024
d5d2d7f
Merge pull request #6 from travelnetsolutions/cmathis/upgrade-depende…
datasage May 9, 2024
1b655dd
Update node version and publish npm package on release puublish
yaneshtyagi May 23, 2024
0b2f070
Set compilationModel to partial to enable parital ivy compatibility.
yaneshtyagi May 23, 2024
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
113 changes: 0 additions & 113 deletions .all-contributorsrc

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Publish Npm Package

on:
release:
types: [published]

jobs:
publish-gpr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 18
registry-url: https://npm.pkg.github.com/
scope: '@travelnetsolutions'
- run: npm install
- run: npm run package
- run: cd dist/ngx-intl-tel-input && npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
16 changes: 16 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Pull Request

on:
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: npm install
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,5 @@ testem.log
.DS_Store
Thumbs.db
/.vscode

.angular
65 changes: 12 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
# International Telephone Input for Angular (NgxIntlTelInput)

[![All Contributors](https://img.shields.io/badge/all_contributors-4-orange.svg?style=flat-square)](#contributors)

[![Build Status](https://travis-ci.org/webcat12345/ngx-intl-tel-input.svg?branch=master)](https://travis-ci.org/webcat12345/ngx-intl-tel-input) [![npm version](https://badge.fury.io/js/ngx-intl-tel-input.svg)](https://badge.fury.io/js/ngx-intl-tel-input) [![npm](https://img.shields.io/npm/dm/localeval.svg)](https://www.npmjs.com/package/ngx-intl-tel-input)

An Angular package for entering and validating international telephone numbers. It adds a flag dropdown to any input, detects the user's country, displays a relevant placeholder and provides formatting/validation methods.

![alt](readme-assets/ngx-intl-tel-input.jpg)

**Compatibility:**

Validation with [google-libphonenumber](https://github.com/ruimarinho/google-libphonenumber)
Expand All @@ -17,11 +11,22 @@ Validation with [google-libphonenumber](https://github.com/ruimarinho/google-lib
| 3.x.x | 9.x.x - 11.x.x | 6.0.0 |
| 2.x.x | 8.x.x - 9.1.x | 5.6.x |

## TNS - Setup Github Token for Github Packages Auth

1. Go to Github Settings: https://github.com/settings/tokens
2. Generate a new personal access token and make sure the `package:read` scope is set.
3. Make sure to copy the token as you will not be able to copy it again, it is only shown once. Then click the “Enable SSO"
4. Login to to you vagrant box and update the file `~/.bashrc` with the following line `export GITHUB_TOKEN=<your token>`
5. Exit out of the vagrant box and re-ssh back into the vagrant box (this is needed for the .bashrc to actually take).
6. Run command inside your vagrant box `cd /var/www/track/public/ngui-src/`
7. Run command npm install and verify no errors occur.
1. If you are on Linux you may get an `EACCESS` error while installing puppeteer. If you get this error run `npm install puppeteer --unsafe-perm=true`. This should resolve the error.

## Installation

### Install Dependencies

`$ npm install intl-tel-input@17.0.3 --save`
`$ npm install @travelnetsolutions/ngx-intl-tel-input --save`

`$ npm install google-libphonenumber --save`

Expand Down Expand Up @@ -128,55 +133,9 @@ Following formats are supported
- INTERNATIONAL // Produces "+41 44 668 18 00"
- E164 // Produces "+41446681800"

## Library Contributions

- Fork repo.
- Update `./projects/ngx-intl-tel-input`
- Build / test library.
- Update `./src/app` with new functionality.
- Update README.md
- Pull request.

### Helpful commands

- Build lib: `$ npm run build_lib`
- Copy license and readme files: `$ npm run copy-files`
- Create package: `$ npm run npm_pack`
- Build lib and create package: `$ npm run package`

### Use locally

After building and creating package, you can use it locally too.

In your project run:

`$ npm install --save {{path to your local '*.tgz' package file}}`

## Contributors

Thanks goes to these wonderful people ([emoji key](https://github.com/all-contributors/all-contributors#emoji-key)):

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tr>
<td align="center"><a href="https://github.com/webcat12345"><img src="https://avatars3.githubusercontent.com/u/19761422?v=4?s=100" width="100px;" alt=""/><br /><sub><b>webcat_black</b></sub></a><br /><a href="#design-webcat12345" title="Design">🎨</a> <a href="https://github.com/webcat12345/ngx-intl-tel-input/commits?author=webcat12345" title="Code">💻</a> <a href="https://github.com/webcat12345/ngx-intl-tel-input/commits?author=webcat12345" title="Documentation">📖</a> <a href="#ideas-webcat12345" title="Ideas, Planning, & Feedback">🤔</a> <a href="#question-webcat12345" title="Answering Questions">💬</a> <a href="#infra-webcat12345" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#example-webcat12345" title="Examples">💡</a> <a href="#maintenance-webcat12345" title="Maintenance">🚧</a> <a href="https://github.com/webcat12345/ngx-intl-tel-input/pulls?q=is%3Apr+reviewed-by%3Awebcat12345" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/webcat12345/ngx-intl-tel-input/commits?author=webcat12345" title="Tests">⚠️</a></td>
<td align="center"><a href="http://pasevin.com"><img src="https://avatars2.githubusercontent.com/u/1058469?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Aleksandr Pasevin</b></sub></a><br /><a href="https://github.com/webcat12345/ngx-intl-tel-input/commits?author=pasevin" title="Code">💻</a> <a href="https://github.com/webcat12345/ngx-intl-tel-input/commits?author=pasevin" title="Documentation">📖</a> <a href="https://github.com/webcat12345/ngx-intl-tel-input/issues?q=author%3Apasevin" title="Bug reports">🐛</a> <a href="#platform-pasevin" title="Packaging/porting to new platform">📦</a> <a href="#plugin-pasevin" title="Plugin/utility libraries">🔌</a> <a href="#question-pasevin" title="Answering Questions">💬</a> <a href="#infra-pasevin" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#example-pasevin" title="Examples">💡</a> <a href="#maintenance-pasevin" title="Maintenance">🚧</a> <a href="https://github.com/webcat12345/ngx-intl-tel-input/pulls?q=is%3Apr+reviewed-by%3Apasevin" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/webcat12345/ngx-intl-tel-input/commits?author=pasevin" title="Tests">⚠️</a></td>
<td align="center"><a href="https://github.com/Dviejopomata"><img src="https://avatars0.githubusercontent.com/u/6862893?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Dviejo</b></sub></a><br /><a href="https://github.com/webcat12345/ngx-intl-tel-input/commits?author=Dviejopomata" title="Code">💻</a> <a href="https://github.com/webcat12345/ngx-intl-tel-input/issues?q=author%3ADviejopomata" title="Bug reports">🐛</a> <a href="#example-Dviejopomata" title="Examples">💡</a> <a href="https://github.com/webcat12345/ngx-intl-tel-input/commits?author=Dviejopomata" title="Tests">⚠️</a> <a href="#question-Dviejopomata" title="Answering Questions">💬</a> <a href="#maintenance-Dviejopomata" title="Maintenance">🚧</a> <a href="https://github.com/webcat12345/ngx-intl-tel-input/pulls?q=is%3Apr+reviewed-by%3ADviejopomata" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://www.fosforito.net"><img src="https://avatars3.githubusercontent.com/u/5000255?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jens Wagner</b></sub></a><br /><a href="https://github.com/webcat12345/ngx-intl-tel-input/commits?author=Fosforito" title="Code">💻</a></td>
<td align="center"><a href="http://kino.codes"><img src="https://avatars3.githubusercontent.com/u/22554212?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kino Roy</b></sub></a><br /><a href="https://github.com/webcat12345/ngx-intl-tel-input/commits?author=kinoroy" title="Code">💻</a></td>
<td align="center"><a href="https://twitter.com/wwwalkerrun"><img src="https://avatars2.githubusercontent.com/u/457187?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Nathan Walker</b></sub></a><br /><a href="#maintenance-NathanWalker" title="Maintenance">🚧</a> <a href="https://github.com/webcat12345/ngx-intl-tel-input/commits?author=NathanWalker" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/jiarongxu"><img src="https://avatars0.githubusercontent.com/u/502605?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jiarong Xu</b></sub></a><br /><a href="https://github.com/webcat12345/ngx-intl-tel-input/commits?author=jiarongxu" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://crutchcorn.dev"><img src="https://avatars.githubusercontent.com/u/9100169?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Corbin Crutchley</b></sub></a><br /><a href="https://github.com/webcat12345/ngx-intl-tel-input/commits?author=crutchcorn" title="Code">💻</a></td>
</tr>
</table>

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
6 changes: 4 additions & 2 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@
}
}
}
},
"defaultProject": "ngx-intl-tel-input-app"
},
"cli": {
"analytics": false
}
}
133 changes: 66 additions & 67 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,69 +1,68 @@
{
"name": "ngx-intl-tel-input-app",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"build_stats": "ng build --stats-json",
"analyze": "webpack-bundle-analyzer dist/ngx-intl-tel-input-app/stats.json",
"build_lib": "ng build ngx-intl-tel-input",
"copy-license": "cp ./LICENSE ./dist/ngx-intl-tel-input",
"copy-readme": "cp ./README.md ./dist/ngx-intl-tel-input",
"copy-files": "npm run copy-license && npm run copy-readme",
"npm_pack": "npm run copy-files && cd dist/ngx-intl-tel-input && npm pack",
"package": "npm run build_lib && npm run npm_pack",
"postinstall": "ngcc"
},
"private": true,
"dependencies": {
"@angular/animations": "~11.2.1",
"@angular/common": "~11.2.1",
"@angular/compiler": "~11.2.1",
"@angular/core": "~11.2.1",
"@angular/forms": "~11.2.1",
"@angular/platform-browser": "~11.2.1",
"@angular/platform-browser-dynamic": "~11.2.1",
"@angular/router": "~11.2.1",
"bootstrap": "^4.5.2",
"core-js": "^3.6.5",
"google-libphonenumber": "^3.2.3",
"intl-tel-input": "^17.0.3",
"jquery": "^3.5.0",
"ngx-bootstrap": "^6.0.0",
"popper.js": "^1.16.1",
"rxjs": "~6.6.0",
"tslib": "^2.0.0",
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1102.1",
"@angular/cli": "~11.2.1",
"@angular/compiler-cli": "~11.2.1",
"@angular/language-service": "~11.2.1",
"@types/jasmine": "~3.6.0",
"@types/jasminewd2": "~2.0.3",
"@types/node": "^12.11.1",
"ajv": "^6.10.2",
"eslint": "^7.2.0",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~6.1.1",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "^2.0.6",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"ng-packagr": "~11.2.3",
"prettier": "^2.0.5",
"protractor": "^7.0.0",
"rollup": "^2.22.0",
"ts-node": "~7.0.0",
"tslint": "~6.1.3",
"tslint-config-prettier": "^1.18.0",
"typescript": "~4.1.5",
"webpack-bundle-analyzer": "^3.9.0"
}
"name": "ngx-intl-tel-input-app",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"build_stats": "ng build --stats-json",
"analyze": "webpack-bundle-analyzer dist/ngx-intl-tel-input-app/stats.json",
"build_lib": "ng build ngx-intl-tel-input",
"copy-license": "cp ./LICENSE ./dist/ngx-intl-tel-input",
"copy-readme": "cp ./README.md ./dist/ngx-intl-tel-input",
"copy-files": "npm run copy-license && npm run copy-readme",
"npm_pack": "npm run copy-files && cd dist/ngx-intl-tel-input && npm pack",
"package": "npm run build_lib && npm run npm_pack"
},
"private": true,
"dependencies": {
"@angular/animations": "^17.3.7",
"@angular/common": "^17.3.7",
"@angular/compiler": "^17.3.7",
"@angular/core": "^17.3.7",
"@angular/forms": "^17.3.7",
"@angular/platform-browser": "^17.3.7",
"@angular/platform-browser-dynamic": "^17.3.7",
"@angular/router": "^17.3.7",
"@ng-bootstrap/ng-bootstrap": "^16.0.0",
"bootstrap": "^5.3.2",
"core-js": "^3.6.5",
"google-libphonenumber": "^3.2.34",
"intl-tel-input": "^22.0.2",
"jquery": "^3.5.0",
"popper.js": "^1.16.1",
"rxjs": "^7.8.1",
"tslib": "^2.0.0",
"zone.js": "~0.14.5"
},
"devDependencies": {
"@angular-devkit/build-angular": "^17.3.6",
"@angular/cli": "^17.3.6",
"@angular/compiler-cli": "^17.3.7",
"@angular/language-service": "^17.3.7",
"@types/jasmine": "^5.1.4",
"@types/jasminewd2": "~2.0.3",
"@types/node": "^12.11.1",
"ajv": "^6.10.2",
"eslint": "^8.57.0",
"jasmine-core": "^5.1.2",
"jasmine-spec-reporter": "~5.0.0",
"karma": "^6.4.3",
"karma-chrome-launcher": "^3.2.0",
"karma-coverage-istanbul-reporter": "^2.0.6",
"karma-jasmine": "^5.1.0",
"karma-jasmine-html-reporter": "^2.1.0",
"ng-packagr": "^17.3.0",
"prettier": "^2.0.5",
"protractor": "^7.0.0",
"rollup": "^2.22.0",
"ts-node": "~7.0.0",
"tslint": "~6.1.3",
"tslint-config-prettier": "^1.18.0",
"typescript": "^5.3.3",
"webpack-bundle-analyzer": "^3.9.0"
}
}
Loading