Skip to content

Commit

Permalink
feat: Use release drafter
Browse files Browse the repository at this point in the history
  • Loading branch information
alessfg committed Jul 10, 2024
1 parent 0f4d698 commit fb15d59
Show file tree
Hide file tree
Showing 3 changed files with 143 additions and 33 deletions.
118 changes: 118 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
---
name-template: $RESOLVED_VERSION
tag-template: $RESOLVED_VERSION
include-pre-releases: true
# prerelease-identifier: beta # Maybe?
categories:
- title: 💣 Breaking Changes
labels:
- breaking change
- title: 🔔 Deprecation Warnings
labels:
- deprecation
- title: 🚀 Features
labels:
- enhancement
- title: 🐛 Bug Fixes
labels:
- bug
- title: 🧪 Tests
labels:
- tests
- title: 📝 Documentation
labels:
- documentation
- title: 👷 CI/CD
labels:
- ci
- build
- title: 🔨 Maintenance
labels:
- chore
- title: ⬆️ Dependencies
collapse-after: 15
labels:
- dependencies
- title: Other Changes
labels:
- *
exclude-labels:
- skip changelog
version-resolver:
minor:
labels:
- breaking change
- deprecation
patch:
labels:
- bug
- chore
- dependencies
- documentation
- enhancement
- tests
default: patch
autolabeler:
- label: breaking change
body:
- "/breaking/i"
- label: deprecation
branch:
- "/deprecate\/.+/"
title:
- "/deprecate/i"
- label: enhancement
branch:
- "/feat\/.+/"
- "/feature\/.+/"
title:
- "/feat/i"
- "/feature/i"
- label: bug
branch:
- "/fix\/.+/"
- "/bug\/.+/"
- "/bugfix\/.+/"
title:
- "/fix/i"
- "/bug/i"
- "/bugfix/i"
- label: tests
branch:
- "/tests{0,1}\/.+/"
files:
- "/tests/**"
title:
- "/tests{0,1}\/.+/i"
- label: documentation
branch:
- "/docs{0,1}\/.+/"
- "/documentation\/.+/"
files:
- "docs/**"
title:
- "/docs{0,1}\/.+/i"
- "/documentation/i"
- label: dependencies #todo review
files:
- ".github/workflows/requirements/*"
replacers: #todo review
- search: "/(feat|fix|docs|chore|cleanup|style|refactor|perf|test)(\(\w+\))?: /g"
replace: ""
template: |
## What's new in the NGINX S3 Gateway v$RESOLVED_VERSION!
$CHANGES
## Install & Upgrade ## TODO Update or remove
- To install the Ansible NGINX role on a fresh environment, run `ansible-galaxy install nginxinc.nginx`.
- To upgrade the Ansible NGINX role to the latest release, run `ansible-galaxy install -f nginxinc.nginx`.
- To install or upgrade to this specific Ansible NGINX role release ($RESOLVED_VERSION), run `ansible-galaxy install -f nginxinc.nginx,v$RESOLVED_VERSION`.
## Resources ## TODO Update or remove
- Functional configuration examples (check `converge.yml` under each `molecule` scenario) -- [github.com/nginxinc/ansible-role-nginx/tree/$RESOLVED_VERSION/molecule](https://github.com/nginxinc/ansible-role-nginx/tree/$RESOLVED_VERSION/molecule).
- Ansible Galaxy repository -- [galaxy.ansible.com/nginxinc/nginx](https://galaxy.ansible.com/nginxinc/nginx).
- NGINX Ansible role & collection introductory blog -- [nginx.com/blog/announcing-nginx-core-collection-ansible](https://www.nginx.com/blog/announcing-nginx-core-collection-ansible).
- NGINX: Better with Ansible demo -- [github.com/alessfg/nginx-ansible-demo](https://github.com/alessfg/nginx-ansible-demo).
33 changes: 0 additions & 33 deletions .github/release.yml

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Release Drafter
on:
push:
branches: [main]
# pull_request_target event is required for autolabeler to support PRs from forks
pull_request_target:
# Only following types are handled by the action, but one can default to all as well
types: [opened, reopened, synchronize]

permissions: read-all
jobs:
update_release_draft:
permissions:
# write permission is required to create a github release
contents: write
# write permission is required for autolabeler
# otherwise, read permission is required at least
pull-requests: write
runs-on: ubuntu-24.04
steps:
- name: Run Release Drafter
uses: release-drafter/release-drafter@3f0f87098bd6b5c5b9a36d49c41d998ea58f9348 # v6.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit fb15d59

Please sign in to comment.