From 1c3a1240b7303002c2b1b4804347c0134f3a1356 Mon Sep 17 00:00:00 2001 From: Md Sadique Inam Date: Tue, 13 Feb 2024 13:06:59 +0530 Subject: [PATCH] Update package version and implement auto-release workflow The package version in package.json has been updated from 1.0.0 to 1.0.1. Moreover, an auto-release workflow has been added to the GitHub Action to automate the release process. This workflow will draft the next release notes as Pull Requests are merged into "main" and it also includes an autolabeler feature to help categorize the changes. --- .github/auto-release.yml | 79 ++++++++++++++++++++++++++++++ .github/workflows/auto-release.yml | 27 ++++++++++ package.json | 2 +- 3 files changed, 107 insertions(+), 1 deletion(-) create mode 100644 .github/auto-release.yml create mode 100644 .github/workflows/auto-release.yml diff --git a/.github/auto-release.yml b/.github/auto-release.yml new file mode 100644 index 0000000..2acfc61 --- /dev/null +++ b/.github/auto-release.yml @@ -0,0 +1,79 @@ +name-template: 'v$RESOLVED_VERSION 🚀' +tag-template: 'v$RESOLVED_VERSION' +version-template: '$MAJOR.$MINOR.$PATCH' +version-resolver: + major: + labels: + - 'major' + minor: + labels: + - 'minor' + - 'enhancement' + - 'feature' + - 'dependency-update' + patch: + labels: + - 'auto-update' + - 'patch' + - 'fix' + - 'chore' + - 'bugfix' + - 'bug' + - 'hotfix' + default: 'patch' + +categories: + - title: '🚀 Enhancements' + labels: + - 'enhancement' + - 'feature' + - 'patch' + - title: '⬆️ Upgrades' + labels: + - 'upgrades' + - title: '🐛 Bug Fixes' + labels: + - 'fix' + - 'bugfix' + - 'bug' + - 'hotfix' + - title: '🤖 Automatic Updates' + labels: + - 'auto-update' + - title: '📝 Documentation' + labels: + - 'docs' + +autolabeler: + - label: 'docs' + files: + - '*.md' + - label: 'enhancement' + title: '/enhancement|fixes/i' + + - label: 'upgrades' + title: '/⬆️/i' + + - label: 'bugfix' + title: '/bugfix/i' + + - label: 'bug' + title: '/🐛|🐞|bug/i' + + - label: 'auto-update' + title: '/🤖/i' + + - label: 'feature' + title: '/🚀|🎉/i' + +change-template: | +
+ $TITLE by @$AUTHOR in #$NUMBER + + $BODY +
+ +template: | + ## Changes + + $CHANGES diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml new file mode 100644 index 0000000..e77f2bf --- /dev/null +++ b/.github/workflows/auto-release.yml @@ -0,0 +1,27 @@ +name: auto-release + +on: + push: + # branches to consider in the event; optional, defaults to all + branches: + - commonjs + # pull_request event is required only for autolabeler + pull_request: + # Only following types are handled by the action, but one can default to all as well + types: [opened, reopened, synchronize] + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + # Drafts your next Release notes as Pull Requests are merged into "main" + - uses: release-drafter/release-drafter@v5 + with: + publish: false + prerelease: true + config-name: auto-release.yml + # allows autolabeler to run without unmerged PRs from being added to draft + disable-releaser: ${{ github.ref_name != 'commonjs' }} + env: + GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} diff --git a/package.json b/package.json index 65237a4..1b6b851 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mdsadiqueinam/hash", - "version": "1.0.0", + "version": "1.0.1", "description": "Framework agnostic Password hashing package with support for PHC string format", "main": "build/index.js", "files": [