diff --git a/.github/workflows/build_release_bins.yml b/.github/workflows/build_release_bins.yml index a367cfd..f23bb55 100644 --- a/.github/workflows/build_release_bins.yml +++ b/.github/workflows/build_release_bins.yml @@ -68,6 +68,21 @@ jobs: path: "./ESP/.pio/build/${{ matrix.target_name }}${{ matrix.target_build_type }}/${{ env.FIRMWARE_NAME }}.bin" if-no-files-found: error release-openiris: + strategy: + fail-fast: false + matrix: + target_name: [ + esp32AIThinker, + esp32M5Stack, + esp32Cam, + esp_eye, + wrover, + ] + target_build_type: [ + "", + _release, + _OTA, + ] runs-on: ubuntu-latest needs: [build] steps: @@ -85,11 +100,12 @@ jobs: uses: actions/setup-node@v3 with: node-version: 18 - - run: npm install -g conventional-changelog-angular + - run: npm install -g conventional-changelog - run: npm install -g semantic-release@v19.0.5 - run: npm install -g @semantic-release/exec - run: npm install -g @semantic-release/git - run: npm install -g @semantic-release/release-notes-generator + - run: npm install -g @semantic-release/changelog - run: npm install -g @semantic-release/github - name: Release env: @@ -105,6 +121,4 @@ jobs: - name: "♻️ remove build artifacts" uses: geekyeggo/delete-artifact@v1 with: - name: | - build - release-openiris \ No newline at end of file + name: ${{ matrix.target_name }}${{ matrix.target_build_type }}-firmware \ No newline at end of file diff --git a/.releaserc b/.releaserc index f4070d5..86a8038 100644 --- a/.releaserc +++ b/.releaserc @@ -7,24 +7,53 @@ [ "@semantic-release/commit-analyzer", { - "preset": "angular", + "preset": "conventionalcommits", + "parserOpts": { + "noteKeywords": [ + "BREAKING CHANGE", + "BREAKING CHANGES", + "BREAKING" + ] + }, "releaseRules": [ + { + "breaking": true, + "release": "major" + }, + { + "type": "feat", + "release": "minor" + }, + { + "type": "fix", + "release": "patch" + }, + { + "type": "perf", + "release": "patch" + }, + { + "type": "revert", + "release": "patch" + }, { "type": "docs", + "release": "minor" + }, + { + "type": "style", "release": "patch" }, { "type": "refactor", - "scope": "core-*", - "release": "minor" + "release": "patch" }, { - "type": "feat", - "scope": "feat-*", - "release": "minor" + "type": "test", + "release": "patch" }, { - "type": "refactor", + "type": "build", "release": "patch" }, { @@ -33,19 +62,89 @@ "release": "patch" }, { - "scope": "no-release", + "type": "chore", + "release": false + }, + { + "type": "no-release", "release": false } - ], + ] + } + ], + [ + "@semantic-release/release-notes-generator", + { + "preset": "conventionalcommits", "parserOpts": { "noteKeywords": [ "BREAKING CHANGE", - "BREAKING CHANGES" + "BREAKING CHANGES", + "BREAKING" + ] + }, + "writerOpts": { + "commitsSort": [ + "subject", + "scope" + ] + }, + "presetConfig": { + "types": [ + { + "type": "feat", + "section": "🍕 Features" + }, + { + "type": "feature", + "section": "🍕 Features" + }, + { + "type": "fix", + "section": "🐛 Bug Fixes" + }, + { + "type": "perf", + "section": "🔥 Performance Improvements" + }, + { + "type": "revert", + "section": "⏩ Reverts" + }, + { + "type": "docs", + "section": "📝 Documentation" + }, + { + "type": "style", + "section": "🎨 Styles" + }, + { + "type": "refactor", + "section": "🧑‍💻 Code Refactoring" + }, + { + "type": "test", + "section": "✅ Tests" + }, + { + "type": "build", + "section": "🤖 Build System" + }, + { + "type": "ci", + "section": "🔁 Continuous Integration" + } ] } } ], - "@semantic-release/release-notes-generator", + [ + "@semantic-release/changelog", + { + "changelogTitle": "# 📦 Changelog \n[![conventional commits](https: //img.shields.io/badge/conventional%20commits-1.0.0-yellow.svg)](https://conventionalcommits.org) \n[![semantic versioning](https: //img.shields.io/badge/semantic%20versioning-2.0.0-green.svg)](https://semver.org) \n> All notable changes to this project will be documented in this file" + } + ], [ "@semantic-release/exec", { @@ -56,6 +155,7 @@ [ "@semantic-release/github", { + "addReleases": "bottom", "assets": [ { "path": "./build/**/*.bin" @@ -67,9 +167,11 @@ "@semantic-release/git", { "assets": [ - "ESP/lib/library.json" + "ESP/lib/library.json", + "LICENSE*", + "CHANGELOG.md" ], - "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" + "message": "chore(${nextRelease.type}): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" } ] ]