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

fix: verify #20

Merged
merged 3 commits into from
Dec 8, 2022
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
15 changes: 11 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@ jobs:
- run: yarn install
- run: yarn build
- run: yarn test
- run: yarn release --dry-run
env:
GH_TOKEN: ${{ secrets.GH_PAT }}
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# Disabled due to error:
# ```
# ✖ EINVALIDBRANCH A branch is invalid in the `branches` configuration.
# Each branch in the branches configuration (https://github.com/semantic-release/semantic-release/blob/master/docs/usage/configuration.md#branches) must be either a string, a regexp or an object with a name property.
# Your configuration for the problematic branch is ``.
# ```
# - run: |
# yarn release --debug --dry-run --no-ci --branches main,${{ env.GITHUB_HEAD_REF }}
# env:
# GH_TOKEN: ${{ secrets.GH_PAT }}
# YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 1 addition & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ jobs:
cache: yarn
- run: yarn install
- run: yarn build
- run: yarn release
- run: yarn release --debug
env:
DEBUG: semantic-release:*
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ yarn husky install
- [ ] Monorepo support
- [x] Support for fixed versions
- [x] Support for private/non-private root package
- [ ] Support for channels (added failing tests)
- [x] Support for channels
- [ ] Support for release information for each workspace
- [ ] Support for independant versions (probably impossible without custom
analyze-commits plugin)
Expand Down
4 changes: 4 additions & 0 deletions src/verify-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ export function verifyConfig(config: PluginConfig) {
return errors;
}

if (!(option in VALIDATORS)) {
return errors;
}

if (VALIDATORS[option as keyof PluginConfig](value)) {
return errors;
}
Expand Down