diff --git a/.changeset/config.json b/.changeset/config.json index b8213321c..d1a61232f 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -7,5 +7,5 @@ "access": "public", "baseBranch": "main", "updateInternalDependencies": "patch", - "ignore": [] + "ignore": ["@slack/cli-test"] } diff --git a/.github/maintainers_guide.md b/.github/maintainers_guide.md index adcdc256c..c0d60c7d1 100644 --- a/.github/maintainers_guide.md +++ b/.github/maintainers_guide.md @@ -145,6 +145,8 @@ This project is versioned using [Semantic Versioning](http://semver.org/), parti One package that expands upon the standard major.minor.patch version schema typically associated with Semantic Versioning is the `@slack/cli-test` package. This package employs standard major.minor.patch version, in addition to a [build metadata suffix](https://semver.org/#spec-item-10) suffix of the form `+cli.X.Y.Z`, e.g. `0.1.0+cli.2.24.0`. The version after `+cli.` communicates compatibility between the `@slack/cli-test` package and the [Slack CLI](https://docs.slack.dev/tools/slack-cli/) itself. +> The `@slack/cli-test` package must be published manually because our automated release workflow does not support semver build metadata. See [#2483](https://github.com/slackapi/node-slack-sdk/pull/2483) and [#2492](https://github.com/slackapi/node-slack-sdk/pull/2492) for more context. + ### 🪵 Branches `main` is where active development occurs. Long running named feature branches are occasionally created for collaboration on a feature that has a large scope (because everyone cannot push commits to another person's open Pull Request). After a major version increment, a maintenance branch for the older major version is left open (e.g. `v3`, `v4`, etc). diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 553d5539f..efb240e87 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,16 +9,49 @@ on: concurrency: ${{ github.workflow }}-${{ github.ref }} jobs: - release: - name: Release + changelog: + name: Changelog + runs-on: ubuntu-latest + outputs: + hasChangesets: ${{ steps.changesets.outputs.hasChangesets }} + permissions: + contents: write + pull-requests: write + steps: + - name: Checkout repo + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + with: + persist-credentials: true + + - name: Setup Node + uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 + with: + node-version: 24 + + - name: Install dependencies + run: npm install --verbose + + - name: Create or update release PR + id: changesets + uses: changesets/action@c48e67d110a68bc90ccf1098e9646092baacaa87 # v1.6.0 + with: + commit: "chore: release" + title: "chore: release" + version: npm run changeset -- version + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + publish: + name: Publish + needs: changelog + if: needs.changelog.outputs.hasChangesets == 'false' runs-on: ubuntu-latest environment: publish permissions: contents: write id-token: write # OIDC: https://docs.npmjs.com/trusted-publishers - pull-requests: write steps: - - name: Checkout Repo + - name: Checkout repo uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: persist-credentials: true @@ -30,15 +63,12 @@ jobs: registry-url: "https://registry.npmjs.org" - name: Install dependencies - run: npm install + run: npm install --verbose - - name: Gather changesets + - name: Publish to npm and create GitHub releases uses: changesets/action@c48e67d110a68bc90ccf1098e9646092baacaa87 # v1.6.0 with: createGithubReleases: true - commit: "chore: release" - title: "chore: release" publish: npm run changeset -- publish - version: npm run changeset -- version env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/packages/cli-test/package.json b/packages/cli-test/package.json index 798f6e159..810143201 100644 --- a/packages/cli-test/package.json +++ b/packages/cli-test/package.json @@ -17,7 +17,10 @@ "engines": { "node": ">=18.15.5" }, - "repository": "slackapi/node-slack-sdk", + "repository": { + "type": "git", + "url": "git+https://github.com/slackapi/node-slack-sdk.git" + }, "publishConfig": { "access": "public" }, diff --git a/packages/logger/package.json b/packages/logger/package.json index 2dec307ce..84e8e4dff 100644 --- a/packages/logger/package.json +++ b/packages/logger/package.json @@ -17,7 +17,10 @@ "node": ">= 18", "npm": ">= 8.6.0" }, - "repository": "slackapi/node-slack-sdk", + "repository": { + "type": "git", + "url": "git+https://github.com/slackapi/node-slack-sdk.git" + }, "homepage": "https://docs.slack.dev/tools/node-slack-sdk/", "publishConfig": { "access": "public" diff --git a/packages/oauth/package.json b/packages/oauth/package.json index 3542d4083..492605fc7 100644 --- a/packages/oauth/package.json +++ b/packages/oauth/package.json @@ -19,7 +19,10 @@ "node": ">=18", "npm": ">=8.6.0" }, - "repository": "slackapi/node-slack-sdk", + "repository": { + "type": "git", + "url": "git+https://github.com/slackapi/node-slack-sdk.git" + }, "homepage": "https://docs.slack.dev/tools/node-slack-sdk/oauth/", "publishConfig": { "access": "public" diff --git a/packages/rtm-api/package.json b/packages/rtm-api/package.json index 0874ced05..f1220dd96 100644 --- a/packages/rtm-api/package.json +++ b/packages/rtm-api/package.json @@ -25,7 +25,10 @@ "node": ">=18", "npm": ">=8.6.0" }, - "repository": "slackapi/node-slack-sdk", + "repository": { + "type": "git", + "url": "git+https://github.com/slackapi/node-slack-sdk.git" + }, "homepage": "https://docs.slack.dev/tools/node-slack-sdk/rtm-api/", "publishConfig": { "access": "public" diff --git a/packages/socket-mode/package.json b/packages/socket-mode/package.json index 70495c886..915d307d0 100644 --- a/packages/socket-mode/package.json +++ b/packages/socket-mode/package.json @@ -27,7 +27,10 @@ "node": ">= 18", "npm": ">= 8.6.0" }, - "repository": "slackapi/node-slack-sdk", + "repository": { + "type": "git", + "url": "git+https://github.com/slackapi/node-slack-sdk.git" + }, "homepage": "https://docs.slack.dev/tools/node-slack-sdk/socket-mode/", "publishConfig": { "access": "public" diff --git a/packages/types/package.json b/packages/types/package.json index d6341536b..f3f17dcf5 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -19,7 +19,10 @@ "node": ">= 12.13.0", "npm": ">= 6.12.0" }, - "repository": "slackapi/node-slack-sdk", + "repository": { + "type": "git", + "url": "git+https://github.com/slackapi/node-slack-sdk.git" + }, "homepage": "https://docs.slack.dev/tools/node-slack-sdk/reference/types/", "publishConfig": { "access": "public" diff --git a/packages/web-api/package.json b/packages/web-api/package.json index 155fdb061..aebdcf89c 100644 --- a/packages/web-api/package.json +++ b/packages/web-api/package.json @@ -24,7 +24,10 @@ "node": ">= 18", "npm": ">= 8.6.0" }, - "repository": "slackapi/node-slack-sdk", + "repository": { + "type": "git", + "url": "git+https://github.com/slackapi/node-slack-sdk.git" + }, "homepage": "https://docs.slack.dev/tools/node-slack-sdk/web-api/", "publishConfig": { "access": "public" diff --git a/packages/webhook/package.json b/packages/webhook/package.json index 876f04bbe..37ca02dba 100644 --- a/packages/webhook/package.json +++ b/packages/webhook/package.json @@ -21,7 +21,10 @@ "node": ">= 18", "npm": ">= 8.6.0" }, - "repository": "slackapi/node-slack-sdk", + "repository": { + "type": "git", + "url": "git+https://github.com/slackapi/node-slack-sdk.git" + }, "homepage": "https://docs.slack.dev/tools/node-slack-sdk/webhook/", "publishConfig": { "access": "public"