Skip to content

Commit

Permalink
feat: add semantic-release action
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine committed Mar 25, 2022
1 parent f98c8ba commit 940cf70
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ This is a collection of reusable composite actions for GitHub Actions workflows.
- [update-coverage](#update-coverage)
- [Docker](#docker)
- [build-docker-image](#build-docker-image)
- [Releasing](#releasing)
- [semantic-release](#semantic-release)

## Node

Expand Down Expand Up @@ -147,10 +149,34 @@ Builds a docker image from a Dockerfile. Layers are cached and pruned between jo
- run: docker run ${{ steps.docker.outputs.tagged_image }}
```

## Releasing

### semantic-release

[Source](semantic-release/action.yml)

Run semantic release using the MyParcel bot. Requires npm dependencies to be installed.

#### Inputs

| required | name | description | Example | Default |
|----------|---------|-------------|-------------------------------|---------|
| Yes | `token` | GitHub PAT | `${{ secrets.GITHUB_TOKEN }}` ||

#### Example

```yaml
- uses: myparcelnl/actions/yarn-install@v1
- uses: myparcelnl/actions/semantic-release@v1
with:
token: ${{ secrets.GH_REPO_TOKEN }}
```

[Codecov]: https://codecov.io
[build-docker-image]: #build-docker-image
[codecov/codecov-action]: https://github.com/codecov/codecov-action
[composer-install]: #composer-install
[npm-install]: #npm-install
[setup-node]: #setup-node
[yarn-install]: #yarn-install
[semantic-release]: #semantic-release
20 changes: 20 additions & 0 deletions semantic-release/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: 'Semantic release'
description: 'Run semantic release using the MyParcel bot'

inputs:
token:
description: 'GitHub token'
required: true

runs:
using: composite
steps:
- name: 'Run semantic release'
run: npx semantic-release
shell: bash
env:
GITHUB_TOKEN: ${{ inputs.token }}
GIT_AUTHOR_NAME: MyParcelBot
GIT_AUTHOR_EMAIL: edie+bot@myparcel.nl
GIT_COMMITTER_NAME: MyParcelBot
GIT_COMMITTER_EMAIL: edie+bot@myparcel.nl

0 comments on commit 940cf70

Please sign in to comment.