Skip to content

Commit ce9965a

Browse files
authored
Merge pull request #59 from pmowrer/semantic-release-version
Semantic release version
2 parents 0269fde + 68eaf9a commit ce9965a

3 files changed

Lines changed: 935 additions & 1063 deletions

File tree

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,14 @@ E.g., in a `package.json` release config:
6767

6868
This plugin is best used with a CI build process to fully automate the posting of comments in Github PRs. Ideally, it should run whenever a PR is opened/updated.
6969

70+
#### GitHub Actions
71+
This plugin relies on `semantic-release`'s dry-run feature. Unfortunately, that feature is gated by strict run-time checks, including one that ensures that the branch `semantic-release` runs on is in the release configuration. It depends on [`env-ci`](https://github.com/semantic-release/env-ci) to enforce the checks in CI environments, which doesn't properly resolve the branch name when running in GitHub Actions, [requiring a workaround](https://github.com/semantic-release/semantic-release/issues/1890#issuecomment-974512960):
72+
73+
```yaml
74+
- run: git checkout -b ${{ github.head_ref }}
75+
- run: unset GITHUB_ACTIONS && npx semantic-release-github-pr
76+
```
77+
7078
#### Travis
7179
7280
To only run when necessary, we use the [`$TRAVIS_PULL_REQUEST`](https://docs.travis-ci.com/user/environment-variables/#Convenience-Variables) environment variable to detect whether the build is a ["pull request build"](https://docs.travis-ci.com/user/pull-requests/).

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@
1616
"bin": "./bin/semantic-release-github-pr.js",
1717
"license": "MIT",
1818
"peerDependencies": {
19-
"semantic-release": ">=16.0.0"
19+
"semantic-release": ">=16.0.0 < 20"
2020
},
2121
"dependencies": {
2222
"debug": "^4.1.1",
23-
"env-ci": "^5.0.1",
2423
"execa": "^4.0.0",
2524
"github": "^13.0.0",
2625
"parse-github-url": "^1.0.2",
@@ -33,7 +32,7 @@
3332
"jest": "^25.1.0",
3433
"lint-staged": "^10.0.3",
3534
"prettier": "^1.19.1",
36-
"semantic-release": "^17.0.0"
35+
"semantic-release": "^19"
3736
},
3837
"husky": {
3938
"hooks": {

0 commit comments

Comments
 (0)