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

Automate Releases based on Tagging #1410

Closed
wants to merge 6 commits into from
Closed
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
16 changes: 6 additions & 10 deletions .github/draft-release-notes-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@ replacers:
- search: '##'
replace: '###'

exclude-labels:
- 'skip-changelog'

# Organizing the tagged PRs into unified categories
categories:
- title: 'Breaking Changes'
labels:
- 'Breaking Changes'
- 'breaking'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

breaking-changes?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have a breaking label but no breaking-changes one, is there a difference between them that warrants having both?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upto you, somehow only breaking word didn't make sense to me.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like a >breaking label is used in the OpenSearch repo. For consistency maybe we should go with this?

- title: 'Features'
labels:
- 'feature'
Expand All @@ -28,18 +31,11 @@ categories:
- 'bug'
- title: 'Infrastructure'
labels:
- 'infra'
- 'test'
- 'infrastructure'
- 'dependencies'
- 'github actions'
- title: 'Documentation'
labels:
- 'documentation'
- title: 'Maintenance'
labels:
- "version compatibility"
- "maintenance"
- title: 'Refactoring'
labels:
- 'refactor'
- 'code quality'
- 'maintenance'
29 changes: 29 additions & 0 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Releases

on:
push:
tags:
- '*'

jobs:

build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: GitHub App token
id: github_app_token
uses: tibdex/[email protected]
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
installation_id: 22958780
- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
- uses: actions/checkout@v2
- uses: ncipollo/release-action@v1
with:
github_token: ${{ steps.github_app_token.outputs.token }}
bodyFile: release-notes/opensearch-observability.release-notes-${{steps.tag.outputs.tag}}.md
13 changes: 13 additions & 0 deletions .github/workflows/enforce-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Enforce PR labels

on:
pull_request:
types: [labeled, unlabeled, opened, edited, synchronize]
jobs:
enforce-label:
runs-on: ubuntu-latest
steps:
- uses: yogevbd/[email protected]
with:
REQUIRED_LABELS_ANY: "breaking,feature,enhancement,bug,infrastructure,dependencies,documentation,maintenance,skip-changelog"
REQUIRED_LABELS_ANY_DESCRIPTION: "A release label is required: ['breaking', 'bug', 'dependencies', 'documentation', 'enhancement', 'feature', 'infrastructure', 'maintenance', 'skip-changelog']"