Skip to content

16.0b1

16.0b1 #78

Workflow file for this run

name: Android Notes
on:
pull_request:
paths:
- 'android_beta/*.yml'
- 'android_release/*.yml'
permissions:
contents: read
jobs:
render_notes:
name: Render notes
runs-on: ubuntu-latest
steps:
- name: Checkout this repo
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
fetch-depth: 0
path: notes
- name: Checkout render-notes.py
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
repository: thunderbird/thunderbird-android
sparse-checkout: |
scripts/ci/render-notes.py
scripts/ci/templates/changelog_master.xml
scripts/ci/templates/changelog.txt
scripts/ci/templates/changelog_long.txt
sparse-checkout-cone-mode: false
path: render
- name: Python requirements
run: |
pip install requests pyyaml jinja2
- name: Render Notes
shell: bash
working-directory: notes
env:
BASE_REF: ${{ github.event.pull_request.base.ref }}
run: |
BETA_FILES=$(git diff --name-only origin/$BASE_REF $GITHUB_SHA | grep ^android_beta || true )
for file in $BETA_FILES
do
echo "## $file" | tee -a $GITHUB_STEP_SUMMARY
echo "### net.thunderbird.android.beta" | tee -a $GITHUB_STEP_SUMMARY
BETA_NUMBER=$(yq '.release.groups | length' $file)
RELEASE_NUMBER=$(echo $file | sed -E 's/[^0-9]*([0-9]+\.[0-9]+).*/\1/')
echo "\`\`\`" | tee -a $GITHUB_STEP_SUMMARY
python ../render/scripts/ci/render-notes.py -p net.thunderbird.android.beta ${RELEASE_NUMBER}b${BETA_NUMBER} -r . | tee -a $GITHUB_STEP_SUMMARY
echo "\`\`\`" | tee -a $GITHUB_STEP_SUMMARY
echo "### com.fsck.k9" | tee -a $GITHUB_STEP_SUMMARY
echo "\`\`\`" | tee -a $GITHUB_STEP_SUMMARY
python ../render/scripts/ci/render-notes.py -p com.fsck.k9 ${RELEASE_NUMBER}b${BETA_NUMBER} -r . | tee -a $GITHUB_STEP_SUMMARY
echo "\`\`\`" | tee -a $GITHUB_STEP_SUMMARY
done
RELEASE_FILES=$(git diff --name-only origin/$BASE_REF $GITHUB_SHA | grep ^android_release || true )
for file in $RELEASE_FILES
do
echo "## $file" | tee -a $GITHUB_STEP_SUMMARY
echo "### net.thunderbird.android" | tee -a $GITHUB_STEP_SUMMARY
RELEASE_NUMBER=$(echo $file | sed -E 's/[^0-9]*([0-9]+\.[0-9]+).*/\1/')
echo "\`\`\`" | tee -a $GITHUB_STEP_SUMMARY
python ../render/scripts/ci/render-notes.py -p net.thunderbird.android.beta ${RELEASE_NUMBER} -r . | tee -a $GITHUB_STEP_SUMMARY
echo "\`\`\`" | tee -a $GITHUB_STEP_SUMMARY
echo "### com.fsck.k9" | tee -a $GITHUB_STEP_SUMMARY
echo "\`\`\`" | tee -a $GITHUB_STEP_SUMMARY
python ../render/scripts/ci/render-notes.py -p com.fsck.k9 ${RELEASE_NUMBER} -r . | tee -a $GITHUB_STEP_SUMMARY
echo "\`\`\`" | tee -a $GITHUB_STEP_SUMMARY
done