From e006d3e0a7fe5185f9fc81a95bf264db1f58f806 Mon Sep 17 00:00:00 2001 From: Florian Wilhelm Date: Sat, 16 Jan 2021 21:49:00 +0100 Subject: [PATCH] Setup release workflow --- .github/workflows/release.yml | 34 ++++++++++++++++++++++++++++++++++ release-notes-draft.md | 15 +++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 release-notes-draft.md diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..ebbeaed --- /dev/null +++ b/.github/workflows/release.yml @@ -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 \ No newline at end of file diff --git a/release-notes-draft.md b/release-notes-draft.md new file mode 100644 index 0000000..00cfc6a --- /dev/null +++ b/release-notes-draft.md @@ -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 }} +```