Skip to content

Commit

Permalink
Test multiline changelog extraction with special chars
Browse files Browse the repository at this point in the history
  • Loading branch information
tmolitor-stud-tu committed Jun 24, 2024
1 parent 3b6301f commit e182b87
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# build a new beta release and push it to apple
name: test

# Controls when the action will run.
on:
# Triggers the workflow on push
push:
branches: [ develop ]

workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
buildAndPublishBeta:
name: "Build and Publish Beta Release"
runs-on: self-hosted
outputs:
release-tag: ${{ steps.releasenotes.outputs.tag }}
release-name: ${{ steps.releasenotes.outputs.name }}
release-changelog: ${{ steps.releasenotes.outputs.notes }}
env:
APP_NAME: "Monal"
APP_DIR: "Monal.app"
BUILD_TYPE: "Beta"
EXPORT_OPTIONS_CATALYST_APPSTORE: "../scripts/exportOptions/Stable_Catalyst_ExportOptions.plist"
EXPORT_OPTIONS_CATALYST_APP_EXPORT: "../scripts/exportOptions/Beta_Catalyst_ExportOptions.plist"
EXPORT_OPTIONS_IOS: "../scripts/exportOptions/Beta_iOS_ExportOptions.plist"
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v4
with:
clean: true
submodules: true
fetch-depth: 100
fetch-tags: true
show-progress: true
lfs: true
- name: Checkout beta
run: git checkout beta
- name: Checkout submodules
run: git submodule update -f --init --remote
- name: Extract version number and changelog from newest merge commit
id: releasenotes
run: |
buildNumber=$(git tag --sort="v:refname" | grep "Build_iOS" | tail -n1 | sed 's/Build_iOS_//g')
echo "tag=Build_iOS_$buildNumber" | tee /dev/stderr >> "$GITHUB_OUTPUT"
echo "name=Monal $(git log -n 1 --merges --pretty=format:%s | sed -E 's/^\s*([^\s]+)\s+\(([^\s]+)\)\s*$/\1 (Build '$buildNumber', PR \2)/g')" | tee /dev/stderr >> "$GITHUB_OUTPUT"
echo "notes<<__EOF__" | tee /dev/stderr >> "$GITHUB_OUTPUT"
echo "$(git log -n 1 --merges --pretty=format:%b)" | tee /dev/stderr >> "$GITHUB_OUTPUT"
echo "__EOF__" | tee /dev/stderr >> "$GITHUB_OUTPUT"
- name: Publish ios to appstore connect
run: |
notes=$(printf '%s\n' "${{ steps.releasenotes.outputs.notes }}" | jq -sRr @sh)
fastlane run upload_to_testflight api_key_path:"/Users/ci/appstoreconnect/key.json" team_id:"S8D843U34Y" changelog:$notes ipa:"./Monal/build/ipa/Monal.ipa" distribute_external:true groups:"Internal Pre-Beta Testers","Public Beta" reject_build_waiting_for_review:true submit_beta_review:true

0 comments on commit e182b87

Please sign in to comment.