Skip to content

Commit

Permalink
ci(release): fix packages contents, switch to multi-semantic-release
Browse files Browse the repository at this point in the history
  • Loading branch information
fmauNeko committed Dec 17, 2024
1 parent c8c7c1f commit c8d0d4f
Show file tree
Hide file tree
Showing 7 changed files with 311 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/push-and-pr.workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
issues: write
pull-requests: write
packages: write
id-token: write
steps:
- uses: actions/checkout@v4
- name: Use Node.js 22
Expand All @@ -74,7 +75,7 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
SEMANTIC_RELEASE_NPM_PUBLISH: 'true'
SEMANTIC_RELEASE_SLACK_WEBHOOK: ${{ secrets.SEMANTIC_RELEASE_SLACK_WEBHOOK }}
run: npx semantic-release
run: npx multi-semantic-release

# - name: Rebase dev branch (keep linear history)
# if: ${{ github.ref != 'refs/heads/1-dev' }}
Expand Down
278 changes: 278 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"prepare": "husky"
},
"devDependencies": {
"@anolilab/multi-semantic-release": "^1.1.6",
"@commitlint/cli": "^19.6.1",
"@commitlint/config-conventional": "^19.6.0",
"@eslint/js": "^9.17.0",
Expand Down
12 changes: 9 additions & 3 deletions packages/backend/lib/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
import type TSESLint from '@typescript-eslint/utils/ts-eslint';
import { readFileSync } from 'node:fs';
import { dirname, resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
import defaultConfig from './configs/default.js';
import nodeConfig from './configs/node.js';
import typescriptConfig from './configs/typescript.js';
import arrayForeach from './rules/array-foreach.js';
import noThen from './rules/no-then.js';

import packageJson from '../package.json' with { type: 'json' };
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const pj = resolve(__dirname, '..', 'package.json');
const pkg = JSON.parse(readFileSync(pj, 'utf8'));

const plugin: TSESLint.FlatConfig.Plugin = {
configs: {
Expand All @@ -16,8 +22,8 @@ const plugin: TSESLint.FlatConfig.Plugin = {
typescript: typescriptConfig,
},
meta: {
name: packageJson.name,
version: packageJson.version,
name: pkg.name,
version: pkg.version,
},
rules: {
'array-foreach': arrayForeach,
Expand Down
Loading

0 comments on commit c8d0d4f

Please sign in to comment.