Skip to content

Commit

Permalink
Merge pull request #2212 from dafyddj/ci/sem-rel
Browse files Browse the repository at this point in the history
ci: work on semantic release
  • Loading branch information
dafyddj authored Nov 13, 2024
2 parents b73f9cd + 37da801 commit 2f56031
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 1 deletion.
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;

0 comments on commit 2f56031

Please sign in to comment.