Skip to content
This repository has been archived by the owner on Apr 19, 2021. It is now read-only.

Commit

Permalink
fix: add example .releaserc.js
Browse files Browse the repository at this point in the history
  • Loading branch information
fforootd committed Dec 30, 2019
1 parent 6411ed3 commit e48edd7
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ jobs:
with:
extra_plugins: |
@semantic-release/exec
- name: Echo next version
run: echo $CAOS_NEXT_VERSION
- name: Docker Login
run: docker login $REGISTRY -u ${GITHUB_ACTOR} -p ${GITHUB_TOKEN}
- name: Docker Tag Release
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ RUN npm install -g \
semantic-release@v15.14.0 \
@semantic-release/gitlab-config@v6.0.1 \
@semantic-release/gitlab@v4.1.0 \
@semantic-release/github@v5.5.8
@semantic-release/github@v5.5.8 \
@semantic-release/exec@v3.3.8
ENTRYPOINT ["npx"]
CMD ["semantic-release"]
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Source checkout
uses: actions/checkout@v1
- name: Create Version
uses: caos/semantic-release@v0.2.1
uses: caos/semantic-release@v0.2.4
```

For `--dry-run` just pass the argument to substitute the `CMD` command from the image.
Expand All @@ -52,10 +52,26 @@ jobs:
- name: Source checkout
uses: actions/checkout@v1
- name: Create Version
uses: caos/semantic-release@v0.2.1
uses: caos/semantic-release@v0.2.4
args: "semantic-release --dry-run"
```

If you would like to use the generated version in later steps, just use the env. var `$CAOS_NEXT_VERSION` with the `.releaserc.js` example below.

```js
module.exports = {
branch: 'master',
plugins: [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/github",
["@semantic-release/exec", {
"prepareCmd": "echo '::set-env name=CAOS_NEXT_VERSION::${nextRelease.version}'"
}],
]
};
```

## License

As usual Apache-2.0 see [here](./LICENSE)

0 comments on commit e48edd7

Please sign in to comment.