diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 40d27e7..25df63b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - chore-update-release-ci env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -23,12 +24,12 @@ jobs: run: | sudo apt-get update sudo apt-get install python3.10 nodejs - pip install -r requirements/base.txt pyinstaller~=5.2 staticx~=0.13.6 + python3.10 -m pip install -r requirements/base.txt pyinstaller~=5.2 staticx~=0.13.6 - name: Package the app run: | - pyinstaller app/__main__.py --hidden-import apps/imp --collect-all app --name idr_client_temp -F - staticx dist/idr_client_temp dist/idr_client + python3.10 -m pyinstaller app/__main__.py --collect-all app --name idr_client_temp -F + python3.10 -m staticx dist/idr_client_temp dist/idr_client ./dist/idr_client --version - name: Create a release diff --git a/.releaserc.yaml b/.releaserc.yaml index dc66639..1dc7cff 100644 --- a/.releaserc.yaml +++ b/.releaserc.yaml @@ -1,12 +1,54 @@ -branches: ["main"] -dryRun: false +branches: ["chore-update-release-ci"] +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} diff --git a/tox.ini b/tox.ini index 27dd92c..cff509f 100644 --- a/tox.ini +++ b/tox.ini @@ -58,7 +58,7 @@ passenv = [testenv:package] basepython = python3.10 commands = - 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 {envdir}{/}idr_client {envdir}{/}idr_client --version deps =