Run automated tests #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# build a new beta release and push it to apple | |
name: test | |
# Controls when the action will run. | |
on: | |
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: ubuntu-latest | |
outputs: | |
release-tag: ${{ steps.releasenotes.outputs.tag }} | |
release-name: ${{ steps.releasenotes.outputs.name }} | |
release-changelog: ${{ steps.releasenotes.outputs.notes }} | |
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 fetch | |
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/^[\t\n ]*([^\n\t ]+)[\t\n ]+\(([^\n\t ]+)\)[\t\n ]*$/\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: Notify | |
uses: monal-im/xmpp-notifier@master | |
with: # Set the secrets as inputs | |
jid: ${{ secrets.BOT_JID }} | |
password: ${{ secrets.BOT_PASSWORD }} | |
server_host: ${{ secrets.BOT_SERVER }} | |
#recipient: [email protected] | |
recipient: [email protected] | |
recipient_is_room: true | |
message: | | |
New Betarelease: ${{ steps.releasenotes.outputs.name }} | |
${{ steps.releasenotes.outputs.notes }} | |
- 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 distribute_external:true groups:"Internal Pre-Beta Testers","Public Beta" reject_build_waiting_for_review:true submit_beta_review:true |