Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jay/releases changelog #954

Merged
merged 2 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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