Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: work on semantic release #2212

Merged
merged 1 commit into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,19 @@ jobs:
results:
name: Collect results
permissions:
contents: write
issues: write
pull-requests: write
checks: read
runs-on: ubuntu-latest
steps:
- uses: poseidon/wait-for-status-checks@899c768d191b56eef585c18f8558da19e1f3e707 # v0.6.0
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: [email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]"]
37 changes: 37 additions & 0 deletions .releaserc.cjs
Original file line number Diff line number Diff line change
@@ -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;