From 2db45d83f98508bc328ef986ef1429af8e51a805 Mon Sep 17 00:00:00 2001 From: Willem Date: Fri, 27 Sep 2024 22:24:12 +0200 Subject: [PATCH 01/11] feat: rename classes, remove dependency on angular material font for icons --- .../toastify-toast-container.component.html | 2 +- ...toastify-toast-container.component.spec.ts | 25 ---- .../toastify-toast-container.component.ts | 6 +- .../toastify-toast.component.html | 56 ++++++--- .../toastify-toast.component.scss | 15 ++- .../toastify-toast.component.spec.ts | 25 ---- .../toastify-toast.component.ts | 38 +++--- .../src/styles/_closeButton.scss | 4 +- .../src/styles/_progressBar.scss | 4 +- .../angular-toastify/src/styles/_toast.scss | 89 +++++++------- .../src/styles/_toastContainer.scss | 113 ++++++++++-------- .../src/styles/animations/_bounce.scss | 48 ++++---- .../src/styles/animations/_flip.scss | 12 +- .../src/styles/animations/_slide.scss | 56 ++++----- .../src/styles/animations/_zoom.scss | 12 +- projects/demo/src/index.html | 3 +- 16 files changed, 248 insertions(+), 260 deletions(-) delete mode 100644 projects/angular-toastify/src/lib/toastify-toast-container/toastify-toast-container.component.spec.ts delete mode 100644 projects/angular-toastify/src/lib/toastify-toast/toastify-toast.component.spec.ts diff --git a/projects/angular-toastify/src/lib/toastify-toast-container/toastify-toast-container.component.html b/projects/angular-toastify/src/lib/toastify-toast-container/toastify-toast-container.component.html index a3cd1fc..d430775 100644 --- a/projects/angular-toastify/src/lib/toastify-toast-container/toastify-toast-container.component.html +++ b/projects/angular-toastify/src/lib/toastify-toast-container/toastify-toast-container.component.html @@ -1,4 +1,4 @@ -
+
{ - let component: ToastifyToastContainerComponent; - let fixture: ComponentFixture; - - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [ ToastifyToastContainerComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(ToastifyToastContainerComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/projects/angular-toastify/src/lib/toastify-toast-container/toastify-toast-container.component.ts b/projects/angular-toastify/src/lib/toastify-toast-container/toastify-toast-container.component.ts index d0380a2..99ff5b5 100644 --- a/projects/angular-toastify/src/lib/toastify-toast-container/toastify-toast-container.component.ts +++ b/projects/angular-toastify/src/lib/toastify-toast-container/toastify-toast-container.component.ts @@ -48,12 +48,12 @@ export class ToastifyToastContainerComponent implements OnInit, OnChanges { } getClass(toast: Toast): string { - let base = `toast toast--${ToastType[toast.type]} `; + let base = `angular-toastify-toast angular-toastify-toast--${ToastType[toast.type]} `; const state = this.toastTransitionDict[toast.id]; if (state === TransitionState.entering) { - base += `${this.transition}-enter ${this.transition}-enter--${this.position}`; + base += `angular-toastify-${this.transition}-enter angular-toastify-${this.transition}-enter--${this.position}`; } else if (state === TransitionState.exiting) { - base += `${this.transition}-exit ${this.transition}-exit--${this.position}`; + base += `angular-toastify-${this.transition}-exit angular-toastify-${this.transition}-exit--${this.position}`; } return base; diff --git a/projects/angular-toastify/src/lib/toastify-toast/toastify-toast.component.html b/projects/angular-toastify/src/lib/toastify-toast/toastify-toast.component.html index 538c88a..944c61b 100644 --- a/projects/angular-toastify/src/lib/toastify-toast/toastify-toast.component.html +++ b/projects/angular-toastify/src/lib/toastify-toast/toastify-toast.component.html @@ -1,27 +1,49 @@ -
diff --git a/projects/demo/src/app/demo-page/demo-page.component.ts b/projects/demo/src/app/demo-page/demo-page.component.ts index d069137..75db22a 100644 --- a/projects/demo/src/app/demo-page/demo-page.component.ts +++ b/projects/demo/src/app/demo-page/demo-page.component.ts @@ -15,7 +15,7 @@ export class DemoPageComponent { position = 'top-right'; iconLibraries = ['none', 'material', 'font-awesome']; - iconLibrary = 'material'; + iconLibrary = 'font-awesome'; ToastType = ToastType; autoClose = 5000; disableAutoClose = false; diff --git a/projects/demo/src/index.html b/projects/demo/src/index.html index 4cdff97..13dcc8e 100644 --- a/projects/demo/src/index.html +++ b/projects/demo/src/index.html @@ -10,8 +10,6 @@ - From 4ce6ee8a0f4a1dfdb095ae0d7caabf5c515492a3 Mon Sep 17 00:00:00 2001 From: Willem Date: Fri, 27 Sep 2024 23:09:28 +0200 Subject: [PATCH 03/11] feat: setup gh-pages with github actions --- .github/workflows/main.yml | 44 +++++++++++++++++++++++++++++--------- package-lock.json | 20 ++++++++--------- package.json | 2 +- 3 files changed, 45 insertions(+), 21 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4e13141..3ad8381 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,10 +3,36 @@ name: CI Master on: push: branches: - - master + - 'dev-2.0.0' +# tags: +# - '*' jobs: - build-library: +# build-library: +# runs-on: ubuntu-latest +# steps: +# - name: Checkout repository +# uses: actions/checkout@v1 +# - name: Setup node +# uses: actions/setup-node@v1 +# with: +# node-version: "14" +# registry-url: https://registry.npmjs.org +# - name: Install dependencies +# run: | +# npm ci +# npm uninstall -g @angular/cli +# npm install -g @angular/cli@12 +# - name: Set Version +# run: sed -i "s/\[ci-version\]/${GITHUB_REF##*/}-$GITHUB_RUN_NUMBER/g" ./version.ts +# - name: Build Library +# run: ng build --project angular-toastify +# - name: Publish Library to NPM +# run: npm publish ./dist/angular-toastify +# env: +# NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}} + + deploy-pages: runs-on: ubuntu-latest steps: - name: Checkout repository @@ -18,14 +44,12 @@ jobs: registry-url: https://registry.npmjs.org - name: Install dependencies run: | - npm ci + npm ci --force npm uninstall -g @angular/cli npm install -g @angular/cli@12 - - name: Set Version - run: sed -i "s/\[ci-version\]/${GITHUB_REF##*/}-$GITHUB_RUN_NUMBER/g" ./version.ts - - name: Build Library - run: ng build --project angular-toastify - - name: Publish Library to NPM - run: npm publish ./dist/angular-toastify + - name: Deploy pages env: - NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + ng build --base-href "/angular-toastify/" + npx angular-cli-ghpages --dir=dist/demo diff --git a/package-lock.json b/package-lock.json index 8408f0c..b8be635 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,7 +34,7 @@ "@types/jasmine": "~3.3.8", "@types/jasminewd2": "~2.0.3", "@types/node": "~8.9.4", - "angular-cli-ghpages": "^1.0.0-rc.2", + "angular-cli-ghpages": "^1.0.7", "codelyzer": "^5.0.0", "injection-js": "^2.4.0", "jasmine-core": "~3.4.0", @@ -3830,9 +3830,9 @@ "dev": true }, "node_modules/angular-cli-ghpages": { - "version": "1.0.0-rc.2", - "resolved": "https://registry.npmjs.org/angular-cli-ghpages/-/angular-cli-ghpages-1.0.0-rc.2.tgz", - "integrity": "sha512-oAAnu6hcNYZ5Scp1WrPUnwOHkz6JoPfwPd3b4BYifBHWlwRnB2/zXzqZRYn0vwi2aO9LqMVDbq/7dJlpAWz2LQ==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/angular-cli-ghpages/-/angular-cli-ghpages-1.0.7.tgz", + "integrity": "sha512-7uq+NSqmhVBnA1uimVQVoQfXP80aSJc/nZGdRUiADcTeRQFPamaQUbh4bn2EHiC9TJn44lDOEGnzdhAej0wz6w==", "dev": true, "dependencies": { "commander": "^3.0.0-0", @@ -3844,9 +3844,9 @@ "ngh": "angular-cli-ghpages" }, "peerDependencies": { - "@angular-devkit/architect": ">= 0.900 < 0.1300", - "@angular-devkit/core": "^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0", - "@angular-devkit/schematics": "^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0" + "@angular-devkit/architect": ">= 0.900 < 0.1602.0", + "@angular-devkit/core": "^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0", + "@angular-devkit/schematics": "^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" } }, "node_modules/angular-cli-ghpages/node_modules/commander": { @@ -20805,9 +20805,9 @@ "dev": true }, "angular-cli-ghpages": { - "version": "1.0.0-rc.2", - "resolved": "https://registry.npmjs.org/angular-cli-ghpages/-/angular-cli-ghpages-1.0.0-rc.2.tgz", - "integrity": "sha512-oAAnu6hcNYZ5Scp1WrPUnwOHkz6JoPfwPd3b4BYifBHWlwRnB2/zXzqZRYn0vwi2aO9LqMVDbq/7dJlpAWz2LQ==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/angular-cli-ghpages/-/angular-cli-ghpages-1.0.7.tgz", + "integrity": "sha512-7uq+NSqmhVBnA1uimVQVoQfXP80aSJc/nZGdRUiADcTeRQFPamaQUbh4bn2EHiC9TJn44lDOEGnzdhAej0wz6w==", "dev": true, "requires": { "commander": "^3.0.0-0", diff --git a/package.json b/package.json index 1142613..45422ec 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "@types/jasmine": "~3.3.8", "@types/jasminewd2": "~2.0.3", "@types/node": "~8.9.4", - "angular-cli-ghpages": "^1.0.0-rc.2", + "angular-cli-ghpages": "^1.0.7", "codelyzer": "^5.0.0", "injection-js": "^2.4.0", "jasmine-core": "~3.4.0", From aacfb37fad52d9a05f815bae063ff7b69a219983 Mon Sep 17 00:00:00 2001 From: Willem Date: Fri, 27 Sep 2024 23:25:52 +0200 Subject: [PATCH 04/11] ci: use pat as github token --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3ad8381..cb30c51 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -49,7 +49,7 @@ jobs: npm install -g @angular/cli@12 - name: Deploy pages env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.PAGES_SECRET }} run: | ng build --base-href "/angular-toastify/" npx angular-cli-ghpages --dir=dist/demo From 1b90d51a912ccb7b478d4c509bb424d26a2c1b95 Mon Sep 17 00:00:00 2001 From: Willem Date: Fri, 27 Sep 2024 23:34:25 +0200 Subject: [PATCH 05/11] docs: update readme and changelog for 2.0.0 release --- CHANGELOG.md | 5 +++++ README.md | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c91ae61..d016704 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +##### 2.0.0 + +- ⚠️ Breaking: Re-scoped all Angular Toastify CSS classed by prefixing them with `angular-toastify-`. This should prevent other CSS frameworks from interfering with Angular Toastify its styling. This may fix [#17](https://github.com/scenius-software/angular-toastify/issues/17) and [#48](https://github.com/scenius-software/angular-toastify/issues/48) +- Removed optional dependency on Angular Material icons and/or font-awesome icons. Icons are now included as SVGs instead. + ##### 1.0.8 - Changed handling of large toast bodies. This should address [#54](https://github.com/scenius-software/angular-toastify/issues/54). diff --git a/README.md b/README.md index f99a3f5..c28c894 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,11 @@ Add to component or service: # Changelog +##### 2.0.0 + +- ⚠️ Breaking: Re-scoped all Angular Toastify CSS classed by prefixing them with `angular-toastify-`. This should prevent other CSS frameworks from interfering with Angular Toastify its styling. This may fix [#17](https://github.com/scenius-software/angular-toastify/issues/17) and [#48](https://github.com/scenius-software/angular-toastify/issues/48) +- Removed optional dependency on Angular Material icons and/or font-awesome icons. Icons are now included as SVGs instead. + ##### 1.0.8 - Changed handling of large toast bodies. This should address [#54](https://github.com/scenius-software/angular-toastify/issues/54). From d8da7fbf86c25792344ad9d6838683f2475fe230 Mon Sep 17 00:00:00 2001 From: Willem Date: Fri, 27 Sep 2024 23:38:01 +0200 Subject: [PATCH 06/11] ci: add name and email to pages deploy step --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cb30c51..1e9c71b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -52,4 +52,4 @@ jobs: GITHUB_TOKEN: ${{ secrets.PAGES_SECRET }} run: | ng build --base-href "/angular-toastify/" - npx angular-cli-ghpages --dir=dist/demo + npx angular-cli-ghpages --dir=dist/demo --name="Scenius Software Engineering" --email="support@scenius.nl" From 9a76e6ee8d04901130be90899371678aca228dc3 Mon Sep 17 00:00:00 2001 From: Willem Date: Fri, 27 Sep 2024 23:48:58 +0200 Subject: [PATCH 07/11] ci: add --repo flag to gh deploy step --- .github/workflows/main.yml | 2 +- projects/angular-toastify/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1e9c71b..dd548ab 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -52,4 +52,4 @@ jobs: GITHUB_TOKEN: ${{ secrets.PAGES_SECRET }} run: | ng build --base-href "/angular-toastify/" - npx angular-cli-ghpages --dir=dist/demo --name="Scenius Software Engineering" --email="support@scenius.nl" + npx angular-cli-ghpages --repo=https://github.com/scenius-software/angular-toastify.git --dir=dist/demo --name="Scenius Software Engineering" --email="support@scenius.nl" diff --git a/projects/angular-toastify/package.json b/projects/angular-toastify/package.json index 2ca1bec..37fbee9 100644 --- a/projects/angular-toastify/package.json +++ b/projects/angular-toastify/package.json @@ -1,6 +1,6 @@ { "name": "angular-toastify", - "version": "1.0.8", + "version": "2.0.0", "description": "Somewhat working clone of React Toastify.", "author": "Scenius", "repository": { From 36ae0e621ee8fe68727eb29d4f4a891cfddea111 Mon Sep 17 00:00:00 2001 From: Willem Date: Sat, 28 Sep 2024 00:06:21 +0200 Subject: [PATCH 08/11] feat: add version to demo app --- .github/workflows/main.yml | 2 ++ projects/demo/src/app/demo-page/demo-page.component.html | 2 +- projects/demo/src/app/demo-page/demo-page.component.ts | 2 ++ .../testmodule/testcomponent/testcomponent.component.html | 2 +- .../testmodule/testcomponent/testcomponent.component.ts | 2 ++ projects/demo/src/environments/environment.prod.ts | 4 +++- projects/demo/src/environments/environment.ts | 4 +++- 7 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dd548ab..ba10f37 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -51,5 +51,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.PAGES_SECRET }} run: | + sed -i 's/\[\[VERSION\]\]/$GITHUB_REF_NAME/g' ./projects/demo/src/environments/environment.prod.ts + sed -i 's/\[\[BUILD_DATE\]\]/$(git log -1 --format=%cd --date=format:%Y%m%dh%H%M%S)/g' ./projects/demo/src/environments/environment.prod.ts ng build --base-href "/angular-toastify/" npx angular-cli-ghpages --repo=https://github.com/scenius-software/angular-toastify.git --dir=dist/demo --name="Scenius Software Engineering" --email="support@scenius.nl" diff --git a/projects/demo/src/app/demo-page/demo-page.component.html b/projects/demo/src/app/demo-page/demo-page.component.html index 6d74211..8b2c2d7 100644 --- a/projects/demo/src/app/demo-page/demo-page.component.html +++ b/projects/demo/src/app/demo-page/demo-page.component.html @@ -5,7 +5,7 @@
- Angular Toastify + Angular Toastify ({{environment.version}}) Inspired by React Toastify
diff --git a/projects/demo/src/app/demo-page/demo-page.component.ts b/projects/demo/src/app/demo-page/demo-page.component.ts index 75db22a..ead2e52 100644 --- a/projects/demo/src/app/demo-page/demo-page.component.ts +++ b/projects/demo/src/app/demo-page/demo-page.component.ts @@ -1,6 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { ToastType } from 'projects/angular-toastify/src/lib/toast-type'; import { ToastService } from '../../../../angular-toastify/src/lib/toast.service'; +import { environment } from '../../environments/environment'; @Component({ selector: 'app-demo-page', @@ -25,6 +26,7 @@ export class DemoPageComponent { closeOnClick = true; pauseDelayHover = true; pauseVisibilityChange = true; + environment = environment; constructor(private _toastService: ToastService) { } diff --git a/projects/demo/src/app/submodule-test/testmodule/testcomponent/testcomponent.component.html b/projects/demo/src/app/submodule-test/testmodule/testcomponent/testcomponent.component.html index 2bdeca3..3f457e7 100644 --- a/projects/demo/src/app/submodule-test/testmodule/testcomponent/testcomponent.component.html +++ b/projects/demo/src/app/submodule-test/testmodule/testcomponent/testcomponent.component.html @@ -5,7 +5,7 @@
- Angular Toastify + Angular Toastify ({{environment.version}}) Inspired by React Toastify
diff --git a/projects/demo/src/app/submodule-test/testmodule/testcomponent/testcomponent.component.ts b/projects/demo/src/app/submodule-test/testmodule/testcomponent/testcomponent.component.ts index 60805b4..7bd435e 100644 --- a/projects/demo/src/app/submodule-test/testmodule/testcomponent/testcomponent.component.ts +++ b/projects/demo/src/app/submodule-test/testmodule/testcomponent/testcomponent.component.ts @@ -1,5 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { ToastType } from 'projects/angular-toastify/src/lib/toast-type'; +import { environment } from 'projects/demo/src/environments/environment'; import { ToastService } from '../../../../../../angular-toastify/src/lib/toast.service'; @Component({ @@ -24,6 +25,7 @@ export class TestcomponentComponent { closeOnClick = true; pauseDelayHover = true; pauseVisibilityChange = true; + environment = environment; constructor(private _toastService: ToastService) { } diff --git a/projects/demo/src/environments/environment.prod.ts b/projects/demo/src/environments/environment.prod.ts index 3612073..905463f 100644 --- a/projects/demo/src/environments/environment.prod.ts +++ b/projects/demo/src/environments/environment.prod.ts @@ -1,3 +1,5 @@ export const environment = { - production: true + production: true, + version: '[[VERSION]]', + build_date: '[[BUILD_DATE]]' }; diff --git a/projects/demo/src/environments/environment.ts b/projects/demo/src/environments/environment.ts index 7b4f817..2bc9458 100644 --- a/projects/demo/src/environments/environment.ts +++ b/projects/demo/src/environments/environment.ts @@ -3,7 +3,9 @@ // The list of file replacements can be found in `angular.json`. export const environment = { - production: false + production: false, + version: 'Development', + build_date: 'NOW' }; /* From 99d12ac8a6de90bb2a2fb3e1b61f5abcb62351db Mon Sep 17 00:00:00 2001 From: Willem Date: Sat, 28 Sep 2024 00:14:37 +0200 Subject: [PATCH 09/11] ci: use production release --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ba10f37..87de0d5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -53,5 +53,5 @@ jobs: run: | sed -i 's/\[\[VERSION\]\]/$GITHUB_REF_NAME/g' ./projects/demo/src/environments/environment.prod.ts sed -i 's/\[\[BUILD_DATE\]\]/$(git log -1 --format=%cd --date=format:%Y%m%dh%H%M%S)/g' ./projects/demo/src/environments/environment.prod.ts - ng build --base-href "/angular-toastify/" + ng build --configuration=production --base-href "/angular-toastify/" npx angular-cli-ghpages --repo=https://github.com/scenius-software/angular-toastify.git --dir=dist/demo --name="Scenius Software Engineering" --email="support@scenius.nl" From baeaa4b78f825163c0db54f0ac5ebb11f95502d6 Mon Sep 17 00:00:00 2001 From: Willem Date: Sat, 28 Sep 2024 00:17:13 +0200 Subject: [PATCH 10/11] ci: double quotes to replace variable name in ci --- .github/workflows/main.yml | 4 ++-- projects/angular-toastify/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 87de0d5..8a3285a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -51,7 +51,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.PAGES_SECRET }} run: | - sed -i 's/\[\[VERSION\]\]/$GITHUB_REF_NAME/g' ./projects/demo/src/environments/environment.prod.ts - sed -i 's/\[\[BUILD_DATE\]\]/$(git log -1 --format=%cd --date=format:%Y%m%dh%H%M%S)/g' ./projects/demo/src/environments/environment.prod.ts + sed -i "s/\[\[VERSION\]\]/$GITHUB_REF_NAME/g" ./projects/demo/src/environments/environment.prod.ts + sed -i "s/\[\[BUILD_DATE\]\]/$(git log -1 --format=%cd --date=format:%Y%m%dh%H%M%S)/g" ./projects/demo/src/environments/environment.prod.ts ng build --configuration=production --base-href "/angular-toastify/" npx angular-cli-ghpages --repo=https://github.com/scenius-software/angular-toastify.git --dir=dist/demo --name="Scenius Software Engineering" --email="support@scenius.nl" diff --git a/projects/angular-toastify/package.json b/projects/angular-toastify/package.json index 37fbee9..d8915f3 100644 --- a/projects/angular-toastify/package.json +++ b/projects/angular-toastify/package.json @@ -1,6 +1,6 @@ { "name": "angular-toastify", - "version": "2.0.0", + "version": "2.0.0-dev1", "description": "Somewhat working clone of React Toastify.", "author": "Scenius", "repository": { From be96457d390fa4892b515a435d0788ead1a30293 Mon Sep 17 00:00:00 2001 From: Willem Date: Sat, 28 Sep 2024 00:23:24 +0200 Subject: [PATCH 11/11] ci: restore tag only runs --- .github/workflows/main.yml | 52 ++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8a3285a..a8fbbed 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,35 +2,33 @@ name: CI Master on: push: - branches: - - 'dev-2.0.0' -# tags: -# - '*' + tags: + - '*' jobs: -# build-library: -# runs-on: ubuntu-latest -# steps: -# - name: Checkout repository -# uses: actions/checkout@v1 -# - name: Setup node -# uses: actions/setup-node@v1 -# with: -# node-version: "14" -# registry-url: https://registry.npmjs.org -# - name: Install dependencies -# run: | -# npm ci -# npm uninstall -g @angular/cli -# npm install -g @angular/cli@12 -# - name: Set Version -# run: sed -i "s/\[ci-version\]/${GITHUB_REF##*/}-$GITHUB_RUN_NUMBER/g" ./version.ts -# - name: Build Library -# run: ng build --project angular-toastify -# - name: Publish Library to NPM -# run: npm publish ./dist/angular-toastify -# env: -# NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}} + build-library: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v1 + - name: Setup node + uses: actions/setup-node@v1 + with: + node-version: "14" + registry-url: https://registry.npmjs.org + - name: Install dependencies + run: | + npm ci + npm uninstall -g @angular/cli + npm install -g @angular/cli@12 + - name: Set Version + run: sed -i "s/\[ci-version\]/${GITHUB_REF##*/}-$GITHUB_RUN_NUMBER/g" ./version.ts + - name: Build Library + run: ng build --project angular-toastify + - name: Publish Library to NPM + run: npm publish ./dist/angular-toastify + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}} deploy-pages: runs-on: ubuntu-latest