diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 311a36cb..2906b9d2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -110,6 +110,9 @@ jobs: results: name: Collect results permissions: + contents: write + issues: write + pull-requests: write checks: read runs-on: ubuntu-latest steps: @@ -117,4 +120,9 @@ jobs: with: ignore: Collect results token: ${{ secrets.GITHUB_TOKEN }} - - run: echo "Tests succeeded!" + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + - uses: codfish/semantic-release-action@9a999e0cdb207de2c9d9d4276860435727818989 # v3.4.1 + with: + additional-packages: conventional-changelog-conventionalcommits@7.0.2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 820a2db0..ddc67ee9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,3 +21,9 @@ repos: # renovate: datasource=pypi - json5==0.9.28 args: ["--verbose"] + - repo: https://github.com/biomejs/pre-commit + rev: v0.5.0 + hooks: + - id: biome-check + name: Check JavaScript with biome + additional_dependencies: ["@biomejs/biome@1.9.4"] diff --git a/.releaserc.cjs b/.releaserc.cjs new file mode 100644 index 00000000..59c89fb3 --- /dev/null +++ b/.releaserc.cjs @@ -0,0 +1,37 @@ +const commitTypes = [ + { type: "rem", section: "Removals" }, + { type: "new", section: "New Packages" }, + { type: "update", section: "Updates" }, + { type: "feat", section: "Features" }, + { type: "fix", section: "Bug Fixes" }, + { type: "test", section: "Testing" }, + { type: "ci", section: "Continuous Integration" }, + { type: "revert", section: "Reversions" }, + { type: "docs", section: "Documentation" }, + { type: "perf", section: "Performance Improvements" }, + { type: "refactor", section: "Code Refactoring" }, + { type: "style", section: "Style Changes" }, + { type: "chore", section: "Maintenance" }, +]; + +// Default rules can be found in `github.com/semantic-release/commit-analyzer/lib/default-release-rules.js` +// that cover feat, fix, perf and breaking +const releaseRules = [ + { type: "rem", release: "major" }, + { type: "new", release: "minor" }, + { type: "update", release: "patch" }, +]; + +const config = { + plugins: [ + ["@semantic-release/commit-analyzer", { releaseRules: releaseRules }], + "@semantic-release/release-notes-generator", + "@semantic-release/github", + ], + preset: "conventionalcommits", + presetConfig: { + types: commitTypes, + }, +}; + +module.exports = config;