From 9718f6c09a5eb4eb9c07aa6519de237858c67f09 Mon Sep 17 00:00:00 2001 From: mikhail-klimko Date: Fri, 29 Sep 2023 18:32:18 +0300 Subject: [PATCH] add release-drafter.yaml --- .github/PULL_REQUEST_TEMPLATE.md | 6 +++++ .github/release-drafter.yaml | 8 +++++++ .github/workflows/draft-release.yaml | 33 ++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/release-drafter.yaml create mode 100644 .github/workflows/draft-release.yaml diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..d52927c --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,6 @@ +## What + +## Why + +## Notes + \ No newline at end of file diff --git a/.github/release-drafter.yaml b/.github/release-drafter.yaml new file mode 100644 index 0000000..56a1084 --- /dev/null +++ b/.github/release-drafter.yaml @@ -0,0 +1,8 @@ +name-template: 'v$RESOLVED_VERSION' +tag-template: 'v$RESOLVED_VERSION' +change-template: '- $TITLE @$AUTHOR (#$NUMBER)' +change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. +template: | + ## Changes + + $CHANGES \ No newline at end of file diff --git a/.github/workflows/draft-release.yaml b/.github/workflows/draft-release.yaml new file mode 100644 index 0000000..10c6f4b --- /dev/null +++ b/.github/workflows/draft-release.yaml @@ -0,0 +1,33 @@ +## Reference: https://github.com/release-drafter/release-drafter +name: Create Release + +on: + push: + branches: + - master + +jobs: + create_release: + name: Create Release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set up YQ + uses: frenck/action-setup-yq@v1 + + - name: Get release version from service.yaml + run: | + RELEASE_VERSION=$(yq eval '.version' service.yaml ) + echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV + + - uses: release-drafter/release-drafter@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + publish: true + version: ${{ env.RELEASE_VERSION }} + config-name: release-drafter.yaml