diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 40d27e7..e3fd249 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,13 +24,12 @@ jobs: sudo apt-get update sudo apt-get install python3.10 nodejs pip install -r requirements/base.txt pyinstaller~=5.2 staticx~=0.13.6 - + npm install @semantic-release/changelog @semantic-release/git conventional-changelog-conventionalcommits - name: Package the app run: | - pyinstaller app/__main__.py --hidden-import apps/imp --collect-all app --name idr_client_temp -F + pyinstaller app/__main__.py --collect-all app --name idr_client_temp -F staticx dist/idr_client_temp dist/idr_client ./dist/idr_client --version - - name: Create a release run: npx semantic-release env: diff --git a/.releaserc.yaml b/.releaserc.yaml index dc66639..3fc307b 100644 --- a/.releaserc.yaml +++ b/.releaserc.yaml @@ -1,12 +1,54 @@ branches: ["main"] -dryRun: false +dryRun: true plugins: - - "@semantic-release/commit-analyzer" - - "@semantic-release/release-notes-generator" + - [ "@semantic-release/commit-analyzer", { + parserOpts: { + noteKeywords: [ "BREAKING CHANGE", "BREAKING CHANGES", "BREAKING" ], + }, + preset: "angular", + releaseRules: [ + { type: "chore", scope: "conf", release: "patch" }, + { type: "chore", scope: "config", release: "patch" }, + { type: "chore", scope: "core", release: "minor" }, + { type: "chore", scope: "deps", release: "patch" } + ] + } + ] + - [ "@semantic-release/release-notes-generator", { + parserOpts: { + noteKeywords: [ "BREAKING CHANGE", "BREAKING CHANGES", "BREAKING" ], + }, + preset: "conventionalcommits", + presetConfig: { + types: [ + { type: "chore", scope: "deps", section: "Dependency Updates" }, + { type: "chore", section: "Refactors" }, + { type: "docs", hidden: true }, + { type: "feat", section: "Features" }, + { type: "fix", section: "Bug Fixes" }, + { type: "perf", hidden: true }, + { type: "refactor", section: "Refactors" }, + { type: "style", hidden: true }, + { type: "test", hidden: true } + ] + }, + writerOpts: { + commitsSort: [ "subject", "scope" ], + } + } + ] + - [ "@semantic-release/changelog", + changelogFile: "docs/CHANGELOG.md" + ] + - [ "@semantic-release/git", { + assets: [ "docs/*" ], + message: "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" + } + ] - ["@semantic-release/github", - assets: [ - {path: "dist/idr_client", label: IDR Client Binary} - ] + assets: [ + {path: "dist/idr_client", label: IDR Client Binary} ] + ] tagFormat: v${version}