From a1ff5f4e1a1145dcd97835c9439446fc92a2210b Mon Sep 17 00:00:00 2001 From: Richard Willis Date: Mon, 12 Oct 2020 20:04:02 +0100 Subject: [PATCH 1/2] Try changelog --- .github/workflows/changelog.yml | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/changelog.yml diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml new file mode 100644 index 0000000..3046d8f --- /dev/null +++ b/.github/workflows/changelog.yml @@ -0,0 +1,38 @@ +name: Changelog + +on: + release: + type: [published] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Update version + id: version + run: | + echo "GITHUB_REF is a tag you set for the release" + echo "Your GitHub ref: ${GITHUB_REF}" + VERSION=`echo "${GITHUB_REF}" | cut -f 3 -d "/"` + echo "Preparing version ${VERSION}" + echo "__version__ = \"${VERSION}\"" > __version__.py + echo "##[set-output name=version;]$(echo ${VERSION})" + - uses: vemel/update-changelog@0.0.1 + id: changelog + with: + version: ${{ steps.version.outputs.version }} + - name: Create Pull Request + uses: peter-evans/create-pull-request@v2 + with: + commit-message: Release ${{ steps.version.outputs.version }} + labels: release, bot + title: "Release ${{ steps.version.outputs.version }}" + body: | + # Release ${{ steps.version.outputs.version }} + + Merge this PR to update your version and changelog! + + ## Included Pull Requests + + ${{ steps.changelog.outputs.pulls_list_md }} From 6f356decdc00de2d98fa4ef77cec7bb5bbb638d7 Mon Sep 17 00:00:00 2001 From: Richard Willis Date: Mon, 12 Oct 2020 20:06:08 +0100 Subject: [PATCH 2/2] Add release drafter --- .github/workflows/release-drafter.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/release-drafter.yml diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml new file mode 100644 index 0000000..35566d8 --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,14 @@ +name: Release Drafter +on: + push: + branches: + - master + +jobs: + update_release_draft: + runs-on: ubuntu-latest + steps: + - name: Draft release + uses: release-drafter/release-drafter@v5 + env: + GITHUB_TOKEN: ${{ secrets.RELEASE_DRAFTER_TOKEN_GITHUB }}