Skip to content

Commit

Permalink
Add release.yaml github action
Browse files Browse the repository at this point in the history
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
  • Loading branch information
qu1queee committed Feb 4, 2021
1 parent 6d8f56e commit 45490fe
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit 45490fe

Please sign in to comment.