diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 8d5f2c9..7123fba 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,13 +1,9 @@ - - ## Description - ## Issue - [ ] :clipboard: JIRA_TICKET_URL ## Screenshots - ## PR Readiness Checks - [ ] Your PR title conforms to conventional commits `: `, for example: `fix: PRSDM-123 issue with login` with a maximum of 100 characters diff --git a/.github/workflows/semantic-pull-request.yml b/.github/workflows/lint-pr-title.yml similarity index 94% rename from .github/workflows/semantic-pull-request.yml rename to .github/workflows/lint-pr-title.yml index d3a3a06..59cb7a8 100644 --- a/.github/workflows/semantic-pull-request.yml +++ b/.github/workflows/lint-pr-title.yml @@ -1,4 +1,4 @@ -name: "Lint PR" +name: "Lint PR Title" on: pull_request: diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml deleted file mode 100644 index 5627bb8..0000000 --- a/.github/workflows/release-please.yml +++ /dev/null @@ -1,13 +0,0 @@ -on: - push: - branches: - - develop -name: release-please -jobs: - release-please: - runs-on: ubuntu-latest - steps: - - uses: google-github-actions/release-please-action@v3 - with: - command: manifest - default-branch: develop diff --git a/.releaserc.json b/.releaserc.json new file mode 100644 index 0000000..6686f6c --- /dev/null +++ b/.releaserc.json @@ -0,0 +1,44 @@ +{ + "branches": ["main", { "name": "develop", "prerelease": "rfv" }, "+([0-9])?(.{+([0-9]),x}).x"], + "plugins": [ + ["@semantic-release/commit-analyzer", + { + "releaseRules": [ + { + "type": "refactor", + "release": "patch" + } + ] + } + ], + ["@semantic-release/release-notes-generator", + { + "presetConfig": { + "types": [ + { + "type": "refactor", + "section": "Refactors", + "hidden": false + } + ] + } + } + ], + ["@semantic-release/exec", + { + "prepareCmd": "zip -r -qq presidium-js dist" + } + ], + ["@semantic-release/github", + { + "assets": [ + { + "path": "presidium-js.zip", + "name":"${nextRelease.gitTag}.zip", + "label": "${nextRelease.gitTag}.zip" + } + ] + } + ] + ] +} diff --git a/README.md b/README.md index 485869d..1ede33c 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ make commitlint ### Usage -After installation you can use `git cz` and run through the options and it will build your commit message. For example: +After installation you can use `git cz` and run through the options, it will build your commit message. For example: ``` ? Select the type of change that you're committing: refactor: A code change that neither fixes a bug nor adds a feature (formatting, performance improvement, etc) @@ -90,10 +90,9 @@ This repository uses [Semantic Release](https://semantic-release.gitbook.io/sema Upon merging into to the main or develop branch, Semantic Release tool will: - Calculate the new release version based on the commits -- Generate the CHANGELOG file -- Update the VERSION file - Create a git commit and a git tag for the release -- Create a Release on Github +- Create a Release with release notes from the commit messages +- Create and publish the container images --- @@ -102,11 +101,11 @@ Upon merging into to the main or develop branch, Semantic Release tool will: Please see this [Presidium Git Strategy Miro board](https://miro.com/app/board/uXjVPK0XxiU=/). In summary: -- `main` -> production +- `main` ⇾ production - Only hotfixes or `develop` get merged into `main` - `develop` - - Feature branches and bugfixes are branched from and merged into `develop` -- `feat: <TITLE>` + - Feature branches and bug fixes are branched from and merged into `develop` +- `feat/<TITLE>` - If there is a feature in development it will be on a feature branch --- diff --git a/VERSION b/VERSION deleted file mode 100644 index 09acdb4..0000000 --- a/VERSION +++ /dev/null @@ -1 +0,0 @@ -2.13.2-rfv.4 \ No newline at end of file diff --git a/release.config.js b/release.config.js deleted file mode 100644 index f7d91fd..0000000 --- a/release.config.js +++ /dev/null @@ -1,61 +0,0 @@ -const branch = process.env.BRANCH_NAME - -const config = { - branches: ['main', { name: 'develop', prerelease: 'rfv' }, '+([0-9])?(.{+([0-9]),x}).x'], - plugins: [['@semantic-release/commit-analyzer', - { - releaseRules: [ - { - type: "refactor", - release: "patch", - }, - ], - }, -], - ['@semantic-release/release-notes-generator', - { - presetConfig: { - types: [ - { - type: "refactor", - section: "Refactors", - hidden: false, - }, - ], - }, - }], - [ - "@semantic-release/exec", - { - prepareCmd: "zip -r -qq presidium-js dist && printf '${nextRelease.version}' > VERSION", - }, - ], - [ - '@semantic-release/github', - { - "assets": [ - { "path": "presidium-js.zip", "name":"${nextRelease.gitTag}.zip", "label": "${nextRelease.gitTag}.zip" } - ] - }], -]} - -if (branch == 'main') { - config.plugins.push(['@semantic-release/changelog', - { - changelogFile: "CHANGELOG.md", - }, - ], - ['@semantic-release/git', - { - assets: ['CHANGELOG.md', 'VERSION'], - }, - ]) -} else { - config.plugins.push(['@semantic-release/git', - { - assets: ['VERSION'], - }, - ]) -} - -module.exports = config