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

chore: configure Release Drafter to use releases from a single branch only #2819

Merged
merged 1 commit into from
Feb 18, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# See https://github.com/release-drafter/release-drafter#configuration-options
name-template: 'v$RESOLVED_VERSION'
tag-template: 'REL$RESOLVED_VERSION'
# Filter previous releases to consider only those with the target matching the current branch
filter-by-commitish: true
categories:
- title: '🚀 Features'
labels:
Expand Down
19 changes: 8 additions & 11 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ on:
# branches to consider in the event; optional, defaults to all
branches:
- master
# pull_request event is required only for autolabeler
pull_request:
# Only following types are handled by the action, but one can default to all as well
types: [opened, reopened, synchronize]
- 'release/**'
# pull_request_target allows PR from forks to access secrets, so please NEVER add pull_request_target

jobs:
Expand All @@ -19,35 +16,35 @@ jobs:
runs-on: ubuntu-latest
env:
# Publish pre-release files to a draft release
PUBLISH_SNAPSHOT: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
PUBLISH_SNAPSHOT: true
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- name: Update release body draft
uses: release-drafter/release-drafter@v5
id: prepare_release
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
# with:
with:
# config-name: my-config.yml
# disable-autolabeler: true
disable-autolabeler: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout sources
if: ${{ env.PUBLISH_SNAPSHOT }}
if: ${{ env.PUBLISH_SNAPSHOT == 'true' }}
uses: actions/checkout@v3
- name: Set up JDK 17
if: ${{ env.PUBLISH_SNAPSHOT }}
if: ${{ env.PUBLISH_SNAPSHOT == 'true' }}
uses: actions/setup-java@v3
with:
java-version: 17
distribution: liberica
- name: Build
if: ${{ env.PUBLISH_SNAPSHOT }}
if: ${{ env.PUBLISH_SNAPSHOT == 'true' }}
uses: burrunan/gradle-cache-action@v1
with:
job-id: jdk17
arguments: --scan --no-parallel --no-daemon :postgresql:osgiJar
- name: Attach files to release
if: ${{ env.PUBLISH_SNAPSHOT }}
if: ${{ env.PUBLISH_SNAPSHOT == 'true' }}
uses: actions/github-script@v6
env:
# https://github.com/release-drafter/release-drafter#action-outputs
Expand Down