From 3ee5df165075a44fce6efb57ae0092a6bfff42d9 Mon Sep 17 00:00:00 2001 From: Yunfei Li Date: Sun, 31 Dec 2023 10:03:08 +0100 Subject: [PATCH] feat: semantic release config adjustment (MKH-28) (#49) --- .compodocrc.yaml | 2 +- .github/workflows/release-develop.yml | 42 ------------------- .github/workflows/release-feature.yml | 42 ------------------- .github/workflows/release-main.yml | 12 +++++- .github/workflows/release-next.yml | 42 ------------------- .../src/lib/core/version.ts | 2 +- package-lock.json | 4 +- package.json | 2 +- 8 files changed, 15 insertions(+), 133 deletions(-) delete mode 100644 .github/workflows/release-develop.yml delete mode 100644 .github/workflows/release-feature.yml delete mode 100644 .github/workflows/release-next.yml diff --git a/.compodocrc.yaml b/.compodocrc.yaml index dd57819..f0327b8 100644 --- a/.compodocrc.yaml +++ b/.compodocrc.yaml @@ -3,7 +3,7 @@ name: NgxMultiKeywordsHighlighter Documentation # Configurations: https://compodoc.app/guides/options.html tsconfig: tsconfig.doc.json theme: material -version: 1.0.0 +version: 1.2.0 # language: en-US customFavicon: tools/assets/favicon.ico customLogo: tools/assets/logo-light.svg diff --git a/.github/workflows/release-develop.yml b/.github/workflows/release-develop.yml deleted file mode 100644 index 0ba6dfe..0000000 --- a/.github/workflows/release-develop.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Test release for Feature branch - -on: - push: - branches: [ 'develop' ] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup Node.JS - uses: actions/setup-node@v3 - with: - node-version: 18 - registry-url: 'https://registry.npmjs.org' - - name: Cache NPM packages - id: cache-npm-packages - uses: actions/cache@v3 - env: - cache-name: cache-npm-packages - with: - path: ./node_modules - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} - - if: ${{ steps.cache-npm-packages.outputs.cache-hit != 'true' }} - run: npm ci --ignore-scripts - - name: Config Git User - run: | - git config --global user.email "${{ vars.RELEASE_USER_EMAIL }}" - git config --global user.name "${{ vars.RELEASE_USER_NAME }}" - - name: Lint - run: npm run mkh:lint - - name: Test - run: npm run mkh:test - - name: Build - run: npm run mkh:build - - name: Semantic Release 📦 - run: npx semantic-release --ci --plugins @semantic-release/changelog - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/release-feature.yml b/.github/workflows/release-feature.yml deleted file mode 100644 index 9e128eb..0000000 --- a/.github/workflows/release-feature.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Test release for Feature branch - -on: - push: - branches: [ 'feature/**' ] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup Node.JS - uses: actions/setup-node@v3 - with: - node-version: 18 - registry-url: 'https://registry.npmjs.org' - - name: Cache NPM packages - id: cache-npm-packages - uses: actions/cache@v3 - env: - cache-name: cache-npm-packages - with: - path: ./node_modules - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} - - if: ${{ steps.cache-npm-packages.outputs.cache-hit != 'true' }} - run: npm ci --ignore-scripts - - name: Config Git User - run: | - git config --global user.email "${{ vars.RELEASE_USER_EMAIL }}" - git config --global user.name "${{ vars.RELEASE_USER_NAME }}" - - name: Lint - run: npm run mkh:lint - - name: Test - run: npm run mkh:test - - name: Build - run: npm run mkh:build - - name: Semantic Release 📦 - run: npx semantic-release --ci --plugins @semantic-release/changelog - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/release-main.yml b/.github/workflows/release-main.yml index cd7c076..cfa7fac 100644 --- a/.github/workflows/release-main.yml +++ b/.github/workflows/release-main.yml @@ -28,12 +28,20 @@ jobs: node-version: 18 cache: 'npm' registry-url: 'https://registry.npmjs.org' + - name: Cache NPM packages + id: cache-npm-packages + uses: actions/cache@v3 + env: + cache-name: cache-npm-packages + with: + path: ./node_modules + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} + - if: ${{ steps.cache-npm-packages.outputs.cache-hit != 'true' }} + run: npm ci --ignore-scripts - name: Config Git User run: | git config --global user.email "${{ vars.RELEASE_USER_EMAIL }}" git config --global user.name "${{ vars.RELEASE_USER_NAME }}" - - name: Clean Install - run: npm ci - name: Lint run: npm run mkh:lint - name: Test diff --git a/.github/workflows/release-next.yml b/.github/workflows/release-next.yml deleted file mode 100644 index 36317b9..0000000 --- a/.github/workflows/release-next.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Test release for Feature branch - -on: - push: - branches: [ 'next' ] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup Node.JS - uses: actions/setup-node@v3 - with: - node-version: 18 - registry-url: 'https://registry.npmjs.org' - - name: Cache NPM packages - id: cache-npm-packages - uses: actions/cache@v3 - env: - cache-name: cache-npm-packages - with: - path: ./node_modules - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} - - if: ${{ steps.cache-npm-packages.outputs.cache-hit != 'true' }} - run: npm ci --ignore-scripts - - name: Config Git User - run: | - git config --global user.email "${{ vars.RELEASE_USER_EMAIL }}" - git config --global user.name "${{ vars.RELEASE_USER_NAME }}" - - name: Lint - run: npm run mkh:lint - - name: Test - run: npm run mkh:test - - name: Build - run: npm run mkh:build - - name: Semantic Release 📦 - run: npx semantic-release --ci --plugins @semantic-release/changelog - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} \ No newline at end of file diff --git a/libs/ngx-multi-keywords-highlighter/src/lib/core/version.ts b/libs/ngx-multi-keywords-highlighter/src/lib/core/version.ts index 88715d8..6252e59 100644 --- a/libs/ngx-multi-keywords-highlighter/src/lib/core/version.ts +++ b/libs/ngx-multi-keywords-highlighter/src/lib/core/version.ts @@ -1 +1 @@ -export const version = '1.0.0'; +export const version = '1.2.0'; diff --git a/package-lock.json b/package-lock.json index 66b2609..0a10246 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "mkh", - "version": "1.0.0-development", + "version": "1.2.0-development", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "mkh", - "version": "1.0.0-development", + "version": "1.2.0-development", "license": "MIT", "dependencies": { "@angular/animations": "^17.0.8", diff --git a/package.json b/package.json index 4c81b25..bc1eb50 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mkh", - "version": "1.0.0-development", + "version": "1.2.0-development", "license": "MIT", "author": "Yunfei Li (https://yunfei.li)", "homepage": "https://github.com/dylannnn/ngx-multi-keywords-highlighter#readme",