diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index ddd40690..0c79256b 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -11,7 +11,6 @@ on: - "android/**" - "assets/**" - "lib/**" - - ".releaserc.js" - "pubspec.yaml" jobs: diff --git a/.releaserc b/.releaserc new file mode 100644 index 00000000..fbb12100 --- /dev/null +++ b/.releaserc @@ -0,0 +1,64 @@ +{ + "branches": [ + "main", + { + "name": "dev", + "prerelease": true + } + ], + "plugins": [ + [ + "@semantic-release/commit-analyzer", { + "releaseRules": [ + { "type": "build", "scope": "Needs bump", "release": "patch" } + ] + } + ], + "@semantic-release/changelog", + "@semantic-release/release-notes-generator", + [ + "@droidsolutions-oss/semantic-release-update-file", + { + "files": [ + { + "path": ["pubspec.yaml"], + "type": "flutter", + "branches": ["main", "dev"] + } + ] + } + ], + [ + "@semantic-release/exec", + { + "prepareCmd": "flutter build apk" + } + ], + [ + "@semantic-release/git", + { + "assets": [ + "pubspec.yaml" + ] + } + ], + [ + "@semantic-release/github", + { + "assets": [ + { + "path": "build/app/outputs/apk/release/revanced-manager*.apk" + } + ], + "successComment": false + } + ], + [ + "@saithodev/semantic-release-backmerge", + { + "backmergeBranches": [{"from": "main", "to": "dev"}], + "clearWorkspace": true + } + ] + ] +} diff --git a/.releaserc.js b/.releaserc.js deleted file mode 100644 index 89034052..00000000 --- a/.releaserc.js +++ /dev/null @@ -1,123 +0,0 @@ -module.exports = { - "branches": [ - "main", - { - "name": "dev", - "prerelease": true - } - ], - "plugins": [ - [ - "@semantic-release/commit-analyzer", { - "preset": "conventionalcommits", - "releaseRules": [ - { type: "style", release: "patch" }, - { type: "refactor", release: "patch" }, - { type: "perf", release: "patch" }, - { type: "build", release: "patch" }, - { type: "chore", release: "patch" }, - { type: "revert", release: "patch" } - ] - } - ], - "@semantic-release/changelog", - [ - "@semantic-release/release-notes-generator", - { - preset: "conventionalcommits", - presetConfig: { - types: [ - { type: "feat", section: "Features" }, - { type: "fix", section: "Bug Fixes" }, - { type: "docs", section: "Documentation" }, - { type: "style", section: "Styles" }, - { type: "refactor", section: "Code Refactoring" }, - { type: "perf", section: "Performance Improvements" }, - { type: "test", section: "Tests" }, - { type: "build", section: "Build System" }, - { type: "ci", section: "Continuous Integration" }, - { type: "chore", section: "Chores" }, - { type: "revert", section: "Reverts" }, - ] - }, - writerOpts: { - transform: (commit, context) => { - if (commit.author.name === "semantic-release-bot") return; - const types = { - feat: "Features", - fix: "Bug Fixes", - docs: "Documentation", - style: "Styles", - refactor: "Code Refactoring", - perf: "Performance Improvements", - test: "Tests", - build: "Build System", - ci: "Continuous Integration", - chore: "Chores", - revert: "Reverts", - } - commit.type = types[commit.type]; - return commit; - }, - commitPartial: "* {{#if scope}}**{{scope}}:** {{/if}}{{subject}} ([{{author.name}}]({{~@root.host}}/{{~@root.owner}}/{{~@root.repository}}/commit/{{hash}}))\n", - mainTemplate: ` -{{#each commitGroups}} -{{#if title}} -## {{title}} -{{/if}} -{{#each commits}} -{{> commit root=@root}} -{{/each}} -{{/each}} - ` - } - } - ], - [ - "@droidsolutions-oss/semantic-release-update-file", - { - "files": [ - { - "path": ["pubspec.yaml"], - "type": "flutter", - "branches": ["main", "dev"] - } - ] - } - ], - [ - "@semantic-release/exec", - { - "prepareCmd": "flutter build apk" - } - ], - [ - "@semantic-release/git", - { - "assets": [ - "pubspec.yaml" - ] - } - ], - [ - "@semantic-release/github", - { - "assets": [ - { - "path": "build/app/outputs/apk/release/revanced-manager*.apk" - } - ], - "successComment": false - } - ], - [ - "@saithodev/semantic-release-backmerge", - { - "backmergeBranches": [{"from": "main", "to": "dev"}], - "clearWorkspace": true - } - ] - ], - - -}; diff --git a/package-lock.json b/package-lock.json index 0b35026f..6bc793c0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,13 +4,13 @@ "requires": true, "packages": { "": { + "name": "revanced-manager", "devDependencies": { "@droidsolutions-oss/semantic-release-update-file": "^1.3.2", "@saithodev/semantic-release-backmerge": "^4.0.1", "@semantic-release/changelog": "^6.0.3", "@semantic-release/exec": "^6.0.3", "@semantic-release/git": "^10.0.1", - "conventional-changelog-conventionalcommits": "^7.0.2", "semantic-release": "^23.0.2" } }, @@ -1529,18 +1529,6 @@ "node": ">=16" } }, - "node_modules/conventional-changelog-conventionalcommits": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-7.0.2.tgz", - "integrity": "sha512-NKXYmMR/Hr1DevQegFB4MwfM5Vv0m4UIxKZTTYuD98lpTknaZlSRrDOG4X7wIXpGkfsYxZTghUN+Qq+T0YQI7w==", - "dev": true, - "dependencies": { - "compare-func": "^2.0.0" - }, - "engines": { - "node": ">=16" - } - }, "node_modules/conventional-changelog-writer": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-7.0.1.tgz", diff --git a/package.json b/package.json index 1d2543cd..c4b4619e 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,6 @@ "@semantic-release/changelog": "^6.0.3", "@semantic-release/exec": "^6.0.3", "@semantic-release/git": "^10.0.1", - "conventional-changelog-conventionalcommits": "^7.0.2", "semantic-release": "^23.0.2" } }