Skip to content

Commit

Permalink
Setup release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
fwilhe2 committed Jan 16, 2021
1 parent f73c4a2 commit e006d3e
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release
on:
workflow_dispatch:
repository_dispatch:
types: release

jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Get Version Number
uses: fwilhe2/bump-version@main
id: bump
- run: echo New Version Number ${{ steps.bump.outputs.newVersion }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.bump.outputs.newVersion }}
release_name: Release ${{ steps.bump.outputs.newVersion }}
draft: false
prerelease: false
body_path: release-notes-draft.md
- run: |
echo "" > release-notes-draft.md
git config --global user.name 'Florian Wilhelm'
git config --global user.email 'fwilhelm.wgt+github@gmail.com'
git commit -am "Prepare next development iteration"
git push
15 changes: 15 additions & 0 deletions release-notes-draft.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# New Features

You can select the version component to update.
By default, the `minor` version is updated.
Valid values are `major`, `minor`, `patch`.

Example to update the `patch` version:

```yaml
- uses: fwilhe2/bump-version@main
id: bump
with:
component: patch
- run: echo ${{ steps.bump.outputs.newVersion }}
```

0 comments on commit e006d3e

Please sign in to comment.