Skip to content

Colota - Android GPS Location tracker

ci: restructure release notes and fix two drafting bugs (#567)

Max Dietriche0e517dd173f
diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml
index 461dd792..0700f098 100644
--- a/.github/release-drafter.yml
+++ b/.github/release-drafter.yml
@@ -23,30 +23,39 @@ autolabeler:
- label: feature
title: ['/^feat(\(.+\))?!?:/i']
- label: fix
- title: ['/^fix(\(.+\))?!?:/i']
+ title: ['/^fix(\((?!deps\))[^)]*\))?!?:/i']
- label: documentation
title: ['/^docs(\(.+\))?:/i']
+ - label: refactor
+ title: ['/^(refactor|perf)(\(.+\))?!?:/i']
- label: maintenance
- title: ['/^(chore|refactor|perf|style|ci|build|test)(\((?!deps\))[^)]*\))?!?:/i']
+ title: ['/^(chore|style|ci|build|test)(\((?!deps\))[^)]*\))?!?:/i']
categories:
- - title: 'New Features'
+ - title: 'Breaking Changes'
+ labels: [breaking, major]
+ - title: "What's New"
labels: [feature, enhancement]
- - title: 'Bug Fixes'
+ - title: 'Fixes'
labels: [fix, bug]
- - title: 'Maintenance'
- labels: [maintenance, refactor]
+ - title: 'Improvements'
+ labels: [refactor]
- title: 'Documentation'
labels: [documentation]
+ - title: 'Maintenance'
+ labels: [maintenance]
+ collapse-after: 5
- title: 'Dependencies'
labels: [dependencies, deps]
collapse-after: 3
change-template: '- $TITLE by @$AUTHOR (#$NUMBER)'
no-changes-template: '- No changes'
-category-template: '## $TITLE'
+category-template: '### $TITLE'
template: |
+ ## All changes
+
$CHANGES
## New Contributors
@@ -61,6 +70,5 @@ template: |
- **armeabi-v7a** - older 32-bit devices
- **universal** - one larger APK that runs on any device, if you are unsure
- Choose a **gms** build if you use Google Play Services (better for most users) or a **foss** build for no Google dependencies.
**Full Changelog**: https://github.com/dietrichmax/colota/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml
index 8ed6d9ac..70218b3f 100644
--- a/.github/workflows/prepare-release.yml
+++ b/.github/workflows/prepare-release.yml
@@ -4,7 +4,7 @@ on:
push:
branches:
- main
- pull_request:
+ pull_request_target:
types: [opened, reopened, synchronize]
permissions:
@@ -14,13 +14,28 @@ permissions:
jobs:
update_release_draft:
runs-on: ubuntu-latest
+ if: github.event_name == 'push' || github.event.pull_request.base.repo.full_name == 'dietrichmax/colota'
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
+ - name: Read release summary
+ id: summary
+ run: |
+ f=$(ls fastlane/metadata/android/en-US/changelogs/*.txt 2>/dev/null | sort -V | tail -1)
+ {
+ echo 'text<<COLOTA_EOF'
+ if [ -s "$f" ]; then cat "$f"; else echo '_Not written yet._'; fi
+ echo 'COLOTA_EOF'
+ } >> "$GITHUB_OUTPUT"
+
- name: Update Release Draft
uses: release-drafter/release-drafter@34d80673e067bdc0c24568d3af899c216adcfaa9 # v7
with:
config-name: release-drafter.yml
+ header: |
+ ## Highlights
+
+ ${{ steps.summary.outputs.text }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
\ No newline at end of file