From a253af817cd5e6a0dc98074d365b2893301638bb Mon Sep 17 00:00:00 2001 From: Jay <110402935+jay-418@users.noreply.github.com> Date: Mon, 27 Nov 2023 15:56:20 -0600 Subject: [PATCH 1/2] add a template for GitHub integrated release notes --- .github/release.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/release.yml diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 000000000..83994b6a0 --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,27 @@ +# template for auto-generated release notes +# https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes + +changelog: + # exclude: + # labels: + # - ignore-for-release + # authors: + # - octocat + categories: + - title: ✨ Major Features + labels: + - epic + - title: 🪲 Bug Fixes + labels: + - bug + - cs + - title: 📱 Team Apps + labels: + - team_apps + - title: 📶 Team SDK + labels: + - team_sdk + - title: 🛠️ Team Infra + labels: + - team_infra + - telemetry From 28ab686a195b51e3def37ac76d6ee0fe84f018f9 Mon Sep 17 00:00:00 2001 From: Jay <110402935+jay-418@users.noreply.github.com> Date: Mon, 27 Nov 2023 16:05:31 -0600 Subject: [PATCH 2/2] generate automatic changelog on release, then trigger automation repo --- .github/workflows/release-changelog.yml | 42 +++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/release-changelog.yml diff --git a/.github/workflows/release-changelog.yml b/.github/workflows/release-changelog.yml new file mode 100644 index 000000000..6a8e893db --- /dev/null +++ b/.github/workflows/release-changelog.yml @@ -0,0 +1,42 @@ +name: Release and Changelog + +on: + workflow_dispatch: + push: + tags: + # a prerelease noted by a hyphen will not trigger + - 'lantern-[0-9]+.[0-9]+.[0-9]+' + +jobs: + create-release: + runs-on: ubuntu-latest + steps: + - name: Create release + env: + GH_TOKEN: ${{ github.token }} + # https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#create-a-release + run: | + gh api -i \ + --method POST \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + /repos/${{ github.repository }}/releases \ + -f tag_name='${{ github.ref_name }}' \ + -f name='Release ${{ github.ref_name }}' \ + -f body='🤖 Autogenerated changelog for ${{ github.repository }} ${{ github.ref_name }}' \ + -F draft=false \ + -F prerelease=false \ + -F generate_release_notes=true + - name: Strip repository name of owner + id: repo + run: | + echo "REPO_NAME=$(echo ${{ github.repository }} | sed s/'${{ github.repository_owner }}\/'//g)" >> "$GITHUB_OUTPUT" + - name: Trigger QC Checklist in customer-service repo + env: + GH_GRANTS_TOKEN: ${{ secrets.GH_GRANTS_TOKEN }} + run: | + echo "Sending QC Checklist trigger for ${{ steps.repo.outputs.REPO_NAME }} ${{ github.ref_name }}" + curl -i -H "Accept: application/vnd.github.everest-preview+json" \ + -H "Authorization: token $GH_GRANTS_TOKEN" \ + --request POST --data '{"event_type": "TRIGGER_QC_CHECKLIST", "client_payload": { "platform": "${{ steps.repo.outputs.REPO_NAME }}", "version": "${{ github.ref_name }}"}}' \ + https://api.github.com/repos/getlantern/customer-support/dispatches