Skip to content

Commit

Permalink
feat: Init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
seebeen committed Jul 31, 2023
1 parent 1b390fb commit b2ff4c7
Show file tree
Hide file tree
Showing 71 changed files with 12,993 additions and 2,818 deletions.
7 changes: 5 additions & 2 deletions .eslintrc.js → .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ module.exports = {
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: ['plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js'],
ignorePatterns: ['.eslintrc.cjs'],
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
Expand Down
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* @oblakbot
* @seebeen
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release
on:
push:
branches:
- master
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Lint
run: npm run lint
- name: Test
run: npm run test
- name: Build
run: 'npm run build:production'
- name: Release
env:
GIT_AUTHOR_NAME: 'oblakbot'
GIT_AUTHOR_EMAIL: '[email protected]'
GIT_COMMITTER_NAME: 'oblakbot'
GIT_COMMITTER_EMAIL: '[email protected]'
GITHUB_TOKEN: ${{ secrets.OBLAK_BOT_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
run: npm run semantic-release
4 changes: 4 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ lib
.editorconfig
.eslintrc.js
.prettierrc
jest.config.json
LICENSE
README.md
CHANGELOG.md
tsconfig.json
tsconfig.build.json
tsconfig.buildinfo
48 changes: 48 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"branches": [
"master",
"next"
],
"plugins": [
[
"@semantic-release/changelog",
{
"changelogFile": "CHANGELOG.md"
}
],
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/exec",
{
"prepareCmd": "zip -r /tmp/release.zip dist package.json"
}
],
[
"@semantic-release/git",
{
"assets": [
"CHANGELOG.md"
],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
[
"@semantic-release/github",
{
"assets": [
{
"path": "/tmp/release.zip",
"name": "sr-wp-plugin-${nextRelease.version}.zip",
"label": "Semantic Release WP plugin v${nextRelease.version}"
}
]
}
],
"@semantic-release/npm"
],
"publishConfig": {
"registry": "https://registry.npmjs.org/",
"tag": "latest"
}
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ansible.python.interpreterPath": "/bin/python3"
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Semantic Release WP package plugin
28 changes: 28 additions & 0 deletions jest.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"preset": "ts-jest/presets/js-with-ts-esm",
"moduleFileExtensions": ["js", "json", "ts"],
"moduleNameMapper": {
"^(\\.{1,2}/.*)\\.js$": "$1"
},
"extensionsToTreatAsEsm": [".ts"],
"transform": {
"^.+\\.(mt|t|cj|j)s$": [
"ts-jest",
{
"useESM": true
}
]
},
"coveragePathIgnorePatterns": [
"/node_modules/",
"/test/",
"/dist/",
"/lib/@types",
"/lib/index.ts",
"/(.*)/index.ts"
],
"collectCoverageFrom": ["**/*.(t|j)s"],
"coverageProvider": "v8",
"coverageDirectory": "../coverage",
"testEnvironment": "node"
}
Loading

0 comments on commit b2ff4c7

Please sign in to comment.