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

feat: release pipeline adjustment #45

Merged
merged 13 commits into from
Dec 30, 2023
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
13 changes: 12 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nx/typescript"],
"plugins": ["prettier"],
"extends": [
"plugin:@nx/typescript",
"plugin:prettier/recommended"
],
"rules": {}
},
{
Expand All @@ -41,6 +45,13 @@
"jest": true
},
"rules": {}
},
{
"files": ["*.json"],
"parser": "jsonc-eslint-parser",
"rules": {
"@nx/dependency-checks": "error"
}
}
],
"extends": ["plugin:storybook/recommended"]
Expand Down
29 changes: 0 additions & 29 deletions .github/workflows/pull-request.yml

This file was deleted.

42 changes: 42 additions & 0 deletions .github/workflows/release-develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
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
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
42 changes: 42 additions & 0 deletions .github/workflows/release-feature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
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 }}
35 changes: 35 additions & 0 deletions .github/workflows/release-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish NGX Multi Keywords Highlighter

on:
release:
types: [ published ]

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
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
- 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
run: npm run mkh:test
- name: Build
run: npm run mkh:build
- name: Semantic Release 📦
run: npx semantic-release --branches main --ci
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
42 changes: 42 additions & 0 deletions .github/workflows/release-next.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
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
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
63 changes: 0 additions & 63 deletions .github/workflows/release.yml

This file was deleted.

13 changes: 9 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ Thumbs.db
.angular

# Verdaccio
verdaccio/conf/auth/**/*
!verdaccio/conf/auth/.keepme
verdaccio/conf/storage/**/*
!verdaccio/conf/storage/.keepme
docker/verdaccio/conf/auth/**/*
!docker/verdaccio/conf/auth/.keepme
docker/verdaccio/conf/storage/**/*
!docker/verdaccio/conf/storage/.keepme

# Storybook
build-storybook.log
.nx
.nx/cache
5 changes: 5 additions & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
default: true

MD013: false
MD024:
allow_different_nesting: true
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@

/dist
/coverage

/.nx/cache
6 changes: 5 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{
"singleQuote": true
"singleQuote": true,
"plugins": [
"prettier-plugin-organize-imports",
"prettier-plugin-tailwindcss"
]
}
13 changes: 0 additions & 13 deletions .storybook/main.ts

This file was deleted.

5 changes: 0 additions & 5 deletions .storybook/tsconfig.json

This file was deleted.

Loading
Loading