Skip to content

chore: add v8 canary version publishing #8949

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- v8
pull_request:
branches:
- '**'
Expand Down Expand Up @@ -300,3 +301,36 @@ jobs:
NX_CLOUD_DISTRIBUTED_EXECUTION: false
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true

publish_canary_version_v8:
name: Publish the latest v8 code as a canary version
runs-on: ubuntu-latest
permissions:
id-token: write
needs: [integration_tests, lint_with_build, lint_without_build, unit_tests]
if: github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/v8'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # we need the tags to be available

- name: Install
uses: ./.github/actions/prepare-install
with:
node-version: ${{ env.PRIMARY_NODE_VERSION }}
registry-url: 'https://registry.npmjs.org'

- name: Build
uses: ./.github/actions/prepare-build

- name: Figure out and apply the next canary version
run: npx nx run repo-tools:apply-canary-version

- name: Publish all packages to npm with the canary tag
# NOTE: this needs to be npx, rather than yarn, to make sure the authenticated npm registry is used
run: npx lerna publish premajor --loglevel=verbose --canary --exact --force-publish --yes --dist-tag rc-v8
env:
NX_CLOUD_DISTRIBUTED_EXECUTION: false
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
4 changes: 2 additions & 2 deletions docs/maintenance/Releases.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ Per [Users > Releases > Major Releases](../users/Releases.mdx#major-releases), w
- `v${major}`
- `v${major}-canary-auto-release`
1. Raise a PR from `v${major}-canary-auto-release` to `main` modifying the [`ci.yml` workflow](https://github.com/typescript-eslint/typescript-eslint/blob/main/.github/workflows/ci.yml) [example: [chore: add auto-canary release for v6](https://github.com/typescript-eslint/typescript-eslint/pull/5883)]:
- Under `pushes:` at the beginning of the file, add an `- v${major}` list item.
- Under `push:` > `branches:` at the beginning of the file, add an `- v${major}` list item.
- Add a `publish_canary_version_v${major}` step the same as `publish_canary_version` except:
- Add the condition: `if: github.ref == 'refs/heads/v${major}'`.
- Change the `if` condition's branch check to: `if: github.ref == 'refs/heads/v${major}'`.
- Its publish command should be `npx lerna publish premajor --loglevel=verbose --canary --exact --force-publish --yes --dist-tag rc-v${major}`.
- Merge this into `main` once reviewed and rebase the `v${major}` branch.

Expand Down
Loading