diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..b21284f --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,8 @@ +change-template: "$TITLE (#$NUMBER)" +exclude-labels: + - 'skip-changelog' +template: | + ## Changes + $CHANGES + ## This release was made possible by the following contributors: + $CONTRIBUTORS diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml new file mode 100644 index 0000000..3687efe --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,29 @@ +name: Release Drafter + +on: + push: + branches: + - master + +jobs: + get_version: + runs-on: ubuntu-latest + outputs: + version: ${{ steps.get_version.outputs.version }} + steps: + - uses: actions/checkout@v2 + - id: get_version + run: echo "##[set-output name=version;]"$(grep '^[[:blank:]]*version' setup.py | cut -d'"' -f 2) + + update_release_draft: + needs: get_version + runs-on: ubuntu-latest + steps: + # Drafts your next Release notes as Pull Requests are merged into "master" + - uses: release-drafter/release-drafter@v5 + with: + tag: "${{ needs.get_version.outputs.version }}" + version: "${{ needs.get_version.outputs.version }}" + publish: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}