Skip to content

Commit

Permalink
chore: configure Release Drafter to use releases from a single branch…
Browse files Browse the repository at this point in the history
… only
  • Loading branch information
vlsi committed Feb 18, 2023
1 parent 8be5c9e commit 81aa4f4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .github/release-drafter.yml
@@ -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
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

0 comments on commit 81aa4f4

Please sign in to comment.