diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml new file mode 100644 index 0000000..65d4b34 --- /dev/null +++ b/.github/workflows/changelog.yaml @@ -0,0 +1,21 @@ +name: Release to Production + +on: + release: + types: [published] + +jobs: + semantic-release: + runs-on: ubuntu-latest + outputs: + version: ${{ steps.releaseVersion.outputs.releaseVersion }} + steps: + - uses: actions/checkout@v3 + - uses: cycjimmy/semantic-release-action@v4 + id: semantic + with: + extra_plugins: | + conventional-changelog-conventionalcommits@6.1.0 + @semantic-release/commit-analyzer@10.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.releaserc b/.releaserc new file mode 100644 index 0000000..03326a7 --- /dev/null +++ b/.releaserc @@ -0,0 +1,33 @@ +plugins: [ + ['@semantic-release/commit-analyzer', { + "preset": "conventionalcommits", + "releaseRules": [ + {"type": "static", "release": "patch"}, + {"type": "chore", "release": "patch"}, + {"type": "style", "release": false} + ] + }], + ['@semantic-release/release-notes-generator', { + "preset": "conventionalcommits", + "presetConfig": { + "types": [ + {"type": "feat", "section": "Features"}, + {"type": "fix", "section": "Bug Fixes"}, + {"type": "chore", "hidden": true}, + {"type": "docs", "hidden": true}, + {"type": "style", "hidden": true}, + {"type": "refactor", "hidden": true}, + {"type": "perf", "hidden": true}, + {"type": "test", "hidden": true}, + {"type": "static", "section": "Static Content"}, + ] + }, + }], + ['@semantic-release/github', { + "successComment": false, + "failTitle": false + }] +] +branches: [ + {name: 'main'}, +] \ No newline at end of file