diff --git a/.cliff-jumperrc.yml b/.cliff-jumperrc.yml index e2ebf6f0..abfb1c4e 100644 --- a/.cliff-jumperrc.yml +++ b/.cliff-jumperrc.yml @@ -4,3 +4,8 @@ org: sapphire monoRepo: false commitMessageTemplate: 'chore(release): release {{new-version}}' tagTemplate: v{{new-version}} +identifierBase: false +pushTag: true +githubRelease: true +githubReleaseLatest: true +githubRepo: sapphiredev/shapeshift diff --git a/.github/workflows/continuous-delivery.yml b/.github/workflows/continuous-delivery.yml index 460da0a8..e1e53432 100644 --- a/.github/workflows/continuous-delivery.yml +++ b/.github/workflows/continuous-delivery.yml @@ -48,7 +48,7 @@ jobs: yarn config set npmAuthToken ${NODE_AUTH_TOKEN} yarn config set npmPublishRegistry "https://registry.yarnpkg.com" - yarn bump --preid "${TAG}.$(git rev-parse --verify --short HEAD)" + yarn bump --preid "${TAG}.$(git rev-parse --verify --short HEAD)" --skip-changelog yarn npm publish --tag ${TAG} env: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..0559bc12 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,45 @@ +name: Publish + +on: + workflow_dispatch: + +jobs: + PublishPackage: + name: Publish @sapphire/shapeshift + runs-on: ubuntu-latest + if: github.repository_owner == 'sapphiredev' + steps: + - name: Checkout Project + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: main + token: ${{ secrets.SKYRA_TOKEN }} + - name: Use Node.js v20 + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: yarn + registry-url: https://registry.yarnpkg.com/ + - name: Install Dependencies + run: yarn --immutable + - name: Configure Git + run: | + git remote set-url origin "https://${GITHUB_TOKEN}:x-oauth-basic@github.com/${GITHUB_REPOSITORY}.git" + git config --local user.email "${GITHUB_EMAIL}" + git config --local user.name "${GITHUB_USER}" + env: + GITHUB_USER: github-actions[bot] + GITHUB_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Bump Versions and make release + run: yarn bump + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Publish to NPM + run: | + yarn config set npmAuthToken ${NODE_AUTH_TOKEN} + yarn config set npmPublishRegistry "https://registry.yarnpkg.com" + yarn npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} diff --git a/.vscode/settings.json b/.vscode/settings.json index a7d5da69..557eb3f1 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,9 +1,4 @@ { - "eslint.validate": ["typescript"], - "editor.tabSize": 4, - "editor.useTabStops": true, - "editor.insertSpaces": false, - "editor.detectIndentation": false, "files.eol": "\n", "search.exclude": { "**/node_modules": true, diff --git a/cliff.toml b/cliff.toml index 9d621cc6..a0a7b75c 100644 --- a/cliff.toml +++ b/cliff.toml @@ -5,13 +5,16 @@ header = """ All notable changes to this project will be documented in this file.\n """ body = """ +{%- macro remote_url() -%} + https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} +{%- endmacro -%} {% if version %}\ # [{{ version | trim_start_matches(pat="v") }}]\ {% if previous %}\ {% if previous.version %}\ - (https://github.com/sapphiredev/shapeshift/compare/{{ previous.version }}...{{ version }})\ + ({{ self::remote_url() }}/compare/{{ previous.version }}...{{ version }})\ {% else %}\ - (https://github.com/sapphiredev/shapeshift/tree/{{ version }})\ + ({{ self::remote_url() }}/tree/{{ version }})\ {% endif %}\ {% endif %} \ - ({{ timestamp | date(format="%Y-%m-%d") }}) @@ -24,7 +27,10 @@ body = """ - {% if commit.scope %}\ **{{commit.scope}}:** \ {% endif %}\ - {{ commit.message | upper_first }} ([{{ commit.id | truncate(length=7, end="") }}](https://github.com/sapphiredev/shapeshift/commit/{{ commit.id }}))\ + {{ commit.message | upper_first }} ([{{ commit.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ commit.id }}))\ + {% if commit.github.pr_number %} (\ + [#{{ commit.github.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.github.pr_number }}) by @{{ commit.github.username }}) \ + {%- endif %}\ {% if commit.breaking %}\ {% for breakingChange in commit.footers %}\ \n{% raw %} {% endraw %}- ๐Ÿ’ฅ **{{ breakingChange.token }}{{ breakingChange.separator }}** {{ breakingChange.value }}\ @@ -40,24 +46,32 @@ footer = "" conventional_commits = true filter_unconventional = true commit_parsers = [ - { message = "^feat", group = "๐Ÿš€ Features"}, - { message = "^fix", group = "๐Ÿ› Bug Fixes"}, - { message = "^docs", group = "๐Ÿ“ Documentation"}, - { message = "^perf", group = "๐Ÿƒ Performance"}, - { message = "^refactor", group = "๐Ÿ  Refactor"}, - { message = "^typings", group = "โŒจ๏ธ Typings"}, - { message = "^types", group = "โŒจ๏ธ Typings"}, - { message = ".*deprecated", body = ".*deprecated", group = "๐Ÿšจ Deprecation"}, - { message = "^revert", skip = true}, - { message = "^style", group = "๐Ÿชž Styling"}, - { message = "^test", group = "๐Ÿงช Testing"}, - { message = "^chore", skip = true}, - { message = "^ci", skip = true}, - { message = "^build", skip = true}, - { body = ".*security", group = "๐Ÿ›ก๏ธ Security"}, + { message = "^feat", group = "๐Ÿš€ Features" }, + { message = "^fix", group = "๐Ÿ› Bug Fixes" }, + { message = "^docs", group = "๐Ÿ“ Documentation" }, + { message = "^perf", group = "๐Ÿƒ Performance" }, + { message = "^refactor", group = "๐Ÿ  Refactor" }, + { message = "^typings", group = "โŒจ๏ธ Typings" }, + { message = "^types", group = "โŒจ๏ธ Typings" }, + { message = ".*deprecated", body = ".*deprecated", group = "๐Ÿšจ Deprecation" }, + { message = "^revert", skip = true }, + { message = "^style", group = "๐Ÿชž Styling" }, + { message = "^test", group = "๐Ÿงช Testing" }, + { message = "^chore", skip = true }, + { message = "^ci", skip = true }, + { message = "^build", skip = true }, + { body = ".*security", group = "๐Ÿ›ก๏ธ Security" }, +] +commit_preprocessors = [ + # remove issue numbers from commits + { pattern = '\s\((\w+\s)?#([0-9]+)\)', replace = "" }, ] filter_commits = true tag_pattern = "v[0-9]*" ignore_tags = "" topo_order = false sort_commits = "newest" + +[remote.github] +owner = "sapphiredev" +repo = "shapeshift"