Repository navigation
Релиз 1.2.0 и публикация в npm через Trusted Publishing - #2
Merged
Merged
Conversation
Ship the native-select release and publish it from a v* tag with OIDC, without a stored npm token. Co-authored-by: kellas <alex.step.kellas@gmail.com>
gh release create pushes the tag and publishes the release, so a release trigger would run npm publish twice. Co-authored-by: kellas <alex.step.kellas@gmail.com>
alexstep
marked this pull request as ready for review
October 7, 2026 23:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Версия
1.2.0. Теги, GitHub Release иnpm publishиз этого PR не создавались.Пакет
package.json→1.2.0. Сборка перенесена вprepack, поэтому иnpm pack, иnpm publishкладутdist/в архив.CHANGELOG.mdописывает паритет с нативным<select>относительно опубликованной1.1.5.npm pack --dry-runсобрал tarball и включил то, что нужно потребителю:index.js,custom-select.js,core/,ui/,utils/,keyboard/,filter/,styles/,types/,custom-elements.json,dist/custom-select.min.js,dist/custom-select.min.cssи чанкиdist/*.min.js, плюсREADME,LICENSE,CHANGELOG. Поляmain,module,exportsиtypesуказывают на эти файлы.Публикация
Workflow:
.github/workflows/publish.yml.Единственный триггер — push тега
v*.gh release create vX.Y.Z --target mainи пушит тег, и публикует release; отдельный триггер на release запускал бы публикацию второй раз. Сразу после checkout workflow сравнивает версию тега сpackage.jsonи падает, если они различаются. Дальше Node 24, registryhttps://registry.npmjs.org, npm поднимается доlatestи проверяется порог>= 11.5.1, затемbun test, Playwright иnpm run build. Токенов нет:permissionsтолькоid-token: writeиcontents: read. Пустой_authToken, которыйsetup-nodeпишет из-заregistry-url, снимается, иначе OIDC не стартует.GitHub Environment у job нет.
На npmjs.com в Trusted Publisher для
pure-custom-select:alexstepcustom-selectpublish.ymlnpm publish(конфигурации после 3 сентября 2026 по умолчанию умеют только staged publish)