Skip to content

Commit

Permalink
feat: add release package wd-162 (#232)
Browse files Browse the repository at this point in the history
* ci: edit makefile structure wd-162

* ci: edit lint commint lint action wd-162

* ci: edit commint lint config wd-162

* ci: add release functionality  wd-162

* ci: edit java version in ci action wd-162

* ci: edit java version in ci action wd-162
  • Loading branch information
what1s1ove authored Dec 1, 2023
1 parent dd323b9 commit 2a878f3
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 7 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,19 @@ jobs:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

release:
name: Release
needs: deploy
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Code Checkout
uses: actions/checkout@v4

- name: Release
uses: google-github-actions/release-please-action@v3
with:
command: manifest
3 changes: 1 addition & 2 deletions .github/workflows/ci-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ jobs:
key: ci-pr-${{ hashFiles('**/package-lock.json') }}

- name: Lint Commits
run: |
npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
uses: wagoid/commitlint-github-action@v5

labeler:
name: Labeler
Expand Down
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "1.0.0"
}
13 changes: 9 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,23 @@

clean:
rm -rf build

# Start
start:
npx concurrently -k -p "{name}: {time}" -n "CLIENT,SERVER" -c "green,blue" "make start_client" "make start_server"
start_client:
NODE_ENV=development npx eleventy --serve --quiet
start_server:
npx json-server --watch source/database.json --port 3001

# Build

build: clean
npx eleventy

# Prettify
# Format

prettify:
format:
npx prettier --write "**/*.{json,md,yml,njk,css,js,cjs,d.ts}"

# Lint
Expand All @@ -22,7 +27,7 @@ lint_fs:
npx ls-lint
lint_editor:
npx editorconfig-checker
lint_prettify:
lint_format:
npx prettier --check "**/*.{json,md,yml,njk,css,js,cjs,d.ts}"
lint_markup:
npx node-w3c-validator -i "build/*.html" -f lint -evH
Expand All @@ -36,4 +41,4 @@ lint_js:
npx eslint "**/*.{js,cjs}"
lint_type:
npx tsc --noEmit
lint: lint_fs lint_editor lint_prettify lint_html lint_bem lint_css lint_js lint_type lint_markup
lint: lint_fs lint_editor lint_format lint_html lint_bem lint_css lint_js lint_type lint_markup
4 changes: 3 additions & 1 deletion commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { RuleConfigSeverity } from '@commitlint/types'

import { ProjectPrefix } from './project.config.js'

/** @type {import('@commitlint/types').UserConfig} */
Expand All @@ -9,7 +11,7 @@ let configuration = {
},
},
rules: {
'references-empty': [2, `never`],
'references-empty': [RuleConfigSeverity.Error, `never`],
},
}

Expand Down
3 changes: 3 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"version": "1.0.0",
"name": "whatislove.dev",
"private": true,
"type": "module",
"engines": {
Expand Down
9 changes: 9 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"packages": {
".": {
"release-type": "node",
"pull-request-title-pattern": "chore: release ${version}",
"include-v-in-tag": false
}
}
}

0 comments on commit 2a878f3

Please sign in to comment.