Skip to content

Commit

Permalink
Merge pull request #954 from getlantern/jay/releases-changelog
Browse files Browse the repository at this point in the history
Jay/releases changelog
  • Loading branch information
jay-418 authored Nov 27, 2023
2 parents dc0d648 + 28ab686 commit b139c1d
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -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
42 changes: 42 additions & 0 deletions .github/workflows/release-changelog.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit b139c1d

Please sign in to comment.