Skip to content

Commit

Permalink
build: finish the jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
noomorph committed Oct 21, 2024
1 parent 016ff4e commit 323ec2f
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 64 deletions.
83 changes: 60 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,72 @@
name: CI
name: CI/CD Pipeline

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]

workflow_dispatch:
branches: [main]

jobs:

main:
name: Default
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: NPM install
uses: bahmutov/npm-install@v1
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
useLockFile: false

- name: Bootstrap
run: npm run bootstrap
node-version: '20'
cache: 'yarn'
- run: yarn install --frozen-lockfile
- run: yarn lint

- name: Lint
run: npm run lint:ci
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'yarn'
- run: yarn install --frozen-lockfile
- run: yarn test

- name: Build
run: npm run build
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'yarn'
- run: yarn install --frozen-lockfile
- run: yarn build
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist

- name: Test
run: npm run test
release:
needs: [lint, test, build]
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'yarn'
- run: yarn install --frozen-lockfile
- uses: actions/download-artifact@v4
with:
name: dist
path: dist
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
36 changes: 0 additions & 36 deletions .github/workflows/release.yml

This file was deleted.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
"release": {
"branches": [
"main"
]
],
"pkgRoot": "."
},
"packageManager": "[email protected]"
}
11 changes: 7 additions & 4 deletions packages/analysis/src/multireplacer/executors/RegExpExecutor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ import type { Executor } from './Executor';
type ReplacementValue = string | ((match: string, ...args: any[]) => string);

export class RegExpExecutor<T> implements Executor<T> {
protected readonly sticky: RegExp;
protected readonly global: RegExp;

constructor(
protected readonly regexp: RegExp,
protected readonly replacements: Replacement<ReplacementValue, T>[],
) {}

protected readonly sticky = this._cloneRegexp('y');
protected readonly global = this._cloneRegexp('g');
) {
this.sticky = this._cloneRegexp('y');
this.global = this._cloneRegexp('g');
}

execute(origin: Intermediate<T>): Intermediate<T>[] {
const lastIndices = new Map<Intermediate, number>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ export class MultilingualSynsetSerializer extends XmlSerializer<
},
prettier: {
...options.prettier,
plugins: [
'@prettier/plugin-xml',
...(options.prettier?.plugins ?? []),
],
parser: 'xml',
},
});
Expand Down

0 comments on commit 323ec2f

Please sign in to comment.