diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 3a64eec0f..8347b5aa7 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -229,6 +229,11 @@ steps: - PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 HUSKY=0 yarn install --immutable - echo "+++ Release packages" - yarn release + - | + curl -X POST -H "Accept: application/vnd.github.v3+json" \ + -H "Authorization: token $${GITHUB_TOKEN}" \ + https://api.github.com/repos/segmentio/analytics-next/actions/workflows/release-creator.yml/dispatches \ + -d '{"ref":"master"}' plugins: - ssh://git@github.com/segmentio/cache-buildkite-plugin#v2.0.0: key: "v1.1-cache-dev-{{ checksum 'yarn.lock' }}" diff --git a/.github/workflows/create-github-release.yml b/.github/workflows/create-github-release.yml index 185d40363..aa9aed97f 100644 --- a/.github/workflows/create-github-release.yml +++ b/.github/workflows/create-github-release.yml @@ -1,9 +1,7 @@ # Creating the github release is the final step of the release. name: Create Github Release on: - push: - tags: - - "@segment/*" + workflow_dispatch: jobs: github_release: diff --git a/RELEASING.md b/RELEASING.md index 9e516e8a1..19d961fd3 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -50,14 +50,22 @@ Information is in the [@changesets automation instructions](https://github.com/c [Check out the @changesets automation instructions](https://github.com/changesets/changesets/blob/main/docs/automating-changesets.md#automating-changesets) ### What does `yarn release` do? -- run prepare scripts -- publish all packages to npm -- pushes tags to repo -- triggers a github release on CI (via tags) -- triggers a CDN release +1. Run prepare scripts +2. Publish all packages to npm, pushes _all_ tags to github (e.g. "@segment/analytics-next@1.7.0", "@segment/analytics-node@1.2.3", etc) (Buildkite) +3. Triggets an update of the github releases page (Github Actions) -### I don't want to use automation, how do I manually create a release? +### How do I fix the repo if all the packages were published, but the CI Failed to update the [github releases page](https://github.com/segmentio/analytics-next/releases)? +```bash +# checkout master so the HEAD is pointing to the "Version Packages" PR +git co master && git pull --ff-only +# Reads from the current tags and create github releases +export GITHUB_TOKEN="???" +yarn scripts create-release-from-tags +``` + + +### I don't want to use automation, how do I manually create a release? ```bash export GITHUB_TOKEN="???" ## changelog generator requirement (https://github.com/settings/tokens)