Skip to content
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

ci: fix automated NPM release #131

Merged
merged 2 commits into from
Aug 10, 2024
Merged

ci: fix automated NPM release #131

merged 2 commits into from
Aug 10, 2024

Conversation

lachlancollins
Copy link
Contributor

@lachlancollins lachlancollins commented Aug 9, 2024

Fixes #130

This PR ensures that eslint-plugin-oxlint's version in package.json gets updated to match oxlint's version.

It does not automatically generate PRs for new oxlint versions, but it should automatically release (without needing to manually create a tag) once a manually generated bump_oxlint.yml PR is merged.

I've changed the package versions to reflect oxlint v0.6.1, so this can correctly release v0.7.0. Here's how it should work:

  1. A bump_oxlint.yml workflow is dispatched with the new oxlint version (needs to be prefixed with v, i.e. v0.7.0)
  2. The generate script bumps the version in the local package.json to match oxlint
  3. Prettier now runs after the generate script rather than during, as the API version was generating invalid json outputs
  4. The update PR is generated, with the title release: v0.7.0
  5. When this is merged, the release.yml workflow will start, and run if the latest commit contains release: v
  6. This workflow will extract the version from the commit and create a corresponding tag
  7. Everything else should work the same as before

If this gets merged, could a maintainer please delete the existing GitHub release v0.7.0 (which did not generate an NPM release), and then trigger a new bump_oxlint.yml workflow?

@Boshen Boshen merged commit c0496a3 into oxc-project:main Aug 10, 2024
1 check passed
Boshen pushed a commit that referenced this pull request Aug 10, 2024
This job should not have run:
https://github.com/oxc-project/eslint-plugin-oxlint/actions/runs/10327248826/job/28592123359

I accidentally put quotes around the
[contains](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/expressions#contains)
function in #131 - however, removing them generates a YAML error with
the colon in `'release: v'` (`"release: v"` also fails). A workaround is
to use the
[startsWith](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/expressions#startswith)
function.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New versions not published to NPM
2 participants