From 45490fe13cceddf2b1980006fb98a326e5e792a3 Mon Sep 17 00:00:00 2001 From: Enrique Encalada Date: Wed, 3 Feb 2021 21:16:06 +0100 Subject: [PATCH] Add release.yaml github action This will allow us to construct a draft release with: - Template for the release notes (based on previous releases) - History of commits since latest release - Automatic creation of new desired tag --- .github/workflows/release.yaml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 000000000..a26660527 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,34 @@ +name: Release + +on: + workflow_dispatch: + inputs: + release: + description: 'Desired tag' + required: true + tags: + description: 'Previous tag' + required: true + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2-beta + - name: Build Release Changelog + run: | + git fetch --all --tags --prune --force + echo -e "# Insert Title\n" > Changes.md + git log --pretty=format:"%h - %s - %an" ${{ github.event.inputs.tags }}..HEAD | grep -v "Merge pull" >> Changes.md + echo -e "## Features\n\n## Fixes\n\n## Backwards incompatible changes\n\n## Docs\n\n## Misc\n\n## Thanks" >> Changes.md - name: Draft Release + id: draft_release + uses: actions/create-release@v1 + with: + release_name: "Shipwright Build release ${{ github.event.inputs.release }}" + tag_name: ${{ github.event.inputs.release }} + body_path: Changes.md + draft: true + prerelease: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}