diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2199fd1..f02ad99 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,3 +88,16 @@ jobs: if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request' }} with: github-token: ${{ secrets.GITHUB_TOKEN }} + + release: + name: Create/Update Release Pull Request + if: github.ref == 'refs/heads/master' + needs: [commit-lint, lint, unit-tests] + runs-on: ubuntu-latest + steps: + - name: Release Please + id: release + uses: GoogleCloudPlatform/release-please-action@v2.20.1 + with: + changelog-types: '[ { "type": "feat", "section": "Features", "hidden": false }, { "type": "fix", "section": "Bug Fixes", "hidden": false }, { "type": "build", "section": "Dependencies", "hidden": false }, { "type": "chore", "section": "Miscellaneous", "hidden": false }, { "type": "ci", "section": "Miscellaneous", "hidden": false }, { "type": "perf", "section": "Performance", "hidden": false }, { "type": "refactor", "section": "Miscellaneous", "hidden": false }, { "type": "style", "section": "Miscellaneous", "hidden": false }, { "type": "docs", "section": "Documentation", "hidden": false }]' + release-type: node diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cdeac30..08f8f51 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -47,17 +47,6 @@ Prior to submitting a pull request back to the main repository, please make sure 2. Run `npm test` to check the code adheres to the defined style and that it passes the Jest tests 3. Run `npm run lint:prettier` to run the Prettier code formatter over the code -## Release Process - -When cutting a release, the following steps need to be performed: - -1. Create a release branch with the convention `release/x.x.x` -2. `package.json` needs to have a version update based on the content being released, remembering to adhere to semantic versioning -3. Generate the changelog with `npm run changelog` -4. Create a tag for the version; the naming convention is the version (vx.x.x) -5. Push the tag to the repository -6. Draft a release in the release tab with release notes, copying the notes from the changelog - ## Issues Please file your issues [here](https://github.com/Fdawgs/fastify-disablecache/issues) and try to provide as much information in the template as possible/relevant. diff --git a/package.json b/package.json index 5f7124e..2740a62 100644 --- a/package.json +++ b/package.json @@ -26,13 +26,12 @@ "node": ">=10.22.0" }, "scripts": { - "changelog": "conventional-changelog -p @commitlint/config-conventional -s -i CHANGELOG.md && prettier CHANGELOG.md --write", "jest": "jest --detectOpenHandles --runInBand", "jest:coverage": "jest --coverage --runInBand", "lint": "eslint . --cache --ext js,jsx --ignore-path .gitignore", "lint:licenses": "license-checker --direct --onlyAllow=\"0BSD;Apache-2.0;BSD-2-Clause;BSD-3-Clause;ISC;MIT;Unlicense\" --production --summary", - "lint:prettier": "prettier . --write --ignore-path .gitignore", - "lint:prettier:ci": "prettier . --check --ignore-path .gitignore", + "lint:prettier": "prettier \"**/!(CHANGELOG.md|package.json)\" --write --ignore-path .gitignore --ignore-unknown", + "lint:prettier:ci": "prettier \"**/!(CHANGELOG.md|package.json)\" --check --ignore-path .gitignore --ignore-unknown", "test": "npm run lint && npm run jest" }, "commitlint": { @@ -65,7 +64,6 @@ "devDependencies": { "@commitlint/cli": "^11.0.0", "@commitlint/config-conventional": "^11.0.0", - "conventional-changelog-cli": "^2.1.1", "eslint": "^7.18.0", "eslint-config-airbnb-base": "^14.2.1", "eslint-config-prettier": "^7.1.0",