From bc23d31310f3c0bd8b86acad252e059f717b4f7d Mon Sep 17 00:00:00 2001 From: Tiago Baptista <92083272+tiagobcx@users.noreply.github.com> Date: Mon, 20 Jun 2022 14:59:28 +0100 Subject: [PATCH] Release notes format improvement (#411) * first version for release notes * new automation * Update release.yml Co-authored-by: Pedro Lopes <83576881+pedrompflopes@users.noreply.github.com> --- .github/pr-labeler.yml | 3 +++ .github/release.yml | 24 ++++++++++++++++++++++++ .github/workflows/pr-label.yml | 12 ++++++++++++ .github/workflows/release.yml | 16 ++++++++++++++++ 4 files changed, 55 insertions(+) create mode 100644 .github/pr-labeler.yml create mode 100644 .github/release.yml create mode 100644 .github/workflows/pr-label.yml diff --git a/.github/pr-labeler.yml b/.github/pr-labeler.yml new file mode 100644 index 000000000..83308a13f --- /dev/null +++ b/.github/pr-labeler.yml @@ -0,0 +1,3 @@ +feature: ['feature/*', 'feat/*'] +fix: ['fix/*', 'bug/*'] +dependencies: dependabot/* \ No newline at end of file diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 000000000..5eec051b1 --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,24 @@ +# .github/release.yml + +changelog: + exclude: + labels: + - ignore + categories: + - title: Bug fixes 🐛 + labels: + - bug + - bugs + - fix + - fixes + - title: New Features 🚀 + labels: + - feature + - features + - title: Dependencies updates 🛠 + labels: + - dependencies + - dependency + - title: Other Changes + labels: + - "*" \ No newline at end of file diff --git a/.github/workflows/pr-label.yml b/.github/workflows/pr-label.yml new file mode 100644 index 000000000..8dee99159 --- /dev/null +++ b/.github/workflows/pr-label.yml @@ -0,0 +1,12 @@ +name: PR Labeler +on: + pull_request: + types: [opened] + +jobs: + pr-labeler: + runs-on: ubuntu-latest + steps: + - uses: TimonVS/pr-labeler-action@v3 + env: + GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b02ca2eda..06ea37440 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -60,3 +60,19 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GO_BOT_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + + - name: Get latest relase notes + run: | + body_release="$(gh api -H "Accept: application/vnd.github.v3+json" /repos/ast-cli/releases/releases/latest | jq -r '.body' )" + echo 'BODY_RELEASE='$body_release >> $GITHUB_ENV + - name: Teams notification + uses: toko-bifrost/ms-teams-deploy-card@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + webhook-uri: ${{ secrets.TEAMS_WEBHOOK_URI }} + custom-facts: | + - name: Release : + value: "${{ env.BODY_RELEASE }}" + custom-actions: | + - name: Details + value: https://github.com/Checkmarx/ast-cli/releases/tag/${{ env.RELEASE_VERSION }}