Skip to content

Commit

Permalink
Use rules instead of only in README example (#177)
Browse files Browse the repository at this point in the history
Co-authored-by: JounQin <[email protected]>
  • Loading branch information
F3n67u and JounQin authored May 28, 2024
1 parent ae33d8a commit 31fb0bc
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,14 @@ before_script: yarn --frozen-lockfile
comment:
image: node:lts-alpine
stage: comment
only: merge_requests
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
script: yarn changesets-gitlab comment # comment automatically like https://github.com/changesets/bot

release:
image: node:lts-alpine
only: main
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
script: yarn changesets-gitlab
```
Expand All @@ -96,12 +98,14 @@ before_script: yarn --frozen-lockfile
comment:
image: node:lts-alpine
stage: comment
only: merge_requests
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
script: yarn changesets-gitlab comment
release:
image: node:lts-alpine
only: main
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
script: yarn changesets-gitlab
variables:
INPUT_PUBLISH: yarn release
Expand Down Expand Up @@ -140,13 +144,14 @@ before_script: yarn --frozen-lockfile
comment:
image: node:lts-alpine
stage: comment
only:
- merge_requests
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
script: yarn changesets-gitlab comment
release:
image: node:lts-alpine
only: main
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
script: yarn changesets-gitlab
variables:
INPUT_VERSION: yarn version
Expand All @@ -166,13 +171,14 @@ before_script: yarn --frozen-lockfile
comment:
image: node:lts-alpine
stage: comment
only:
- merge_requests
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
script: yarn changesets-gitlab comment
release:
image: node:lts-alpine
only: main
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
script: yarn changesets-gitlab
variables:
INPUT_VERSION: yarn changeset version
Expand All @@ -183,7 +189,8 @@ You may also want to run `yarn install` after the `changeset verion` command to
```yml
release:
image: node:lts-alpine
only: main
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
script: yarn changesets-gitlab
variables:
YARN_ENABLE_IMMUTABLE_INSTALLS: 'false'
Expand Down

0 comments on commit 31fb0bc

Please sign in to comment.