-
-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use fastlane for stable releases, too
This uses our new mail2webhook python script installed on the mailserver to trigger a workflow posting release information once the iOS build reaches the appstore.
- Loading branch information
1 parent
7833bc2
commit e61dc6b
Showing
3 changed files
with
126 additions
and
27 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Publish release | ||
on: | ||
repository_dispatch: | ||
types: [distribution] | ||
jobs: | ||
extractChangelog: | ||
runs-on: self-hosted | ||
# create release only if the ios app made it to the appstore and ignore the macos appstore state | ||
if: github.event.client_payload.Platform == 'iOS' | ||
steps: | ||
- name: Load release info | ||
id: releasenotes | ||
run: | | ||
buildNumber="$(fastlane run app_store_build_number api_key_path:"/Users/ci/appstoreconnect/key.json" team_id:"S8D843U34Y" app_identifier:"G7YU7X7KRJ.SworIM" live:false version:"${{ github.event.client_payload.AppVersionNumber }}" 2>&1 | tee /dev/stderr | grep Result | sed -E 's/^.*Result: ([0-9]+).*$/\1/g')" | ||
mkdir -p /Users/ci/releases | ||
OUTPUT_FILE="/Users/ci/releases/$buildNumber.output" | ||
touch "$OUTPUT_FILE" | ||
cat "$OUTPUT_FILE" >> "$GITHUB_OUTPUT" | ||
# - run: | | ||
# echo ${{ github.event.client_payload.AppName }} | ||
# echo ${{ github.event.client_payload.Platform }} | ||
# echo ${{ github.event.client_payload.AppVersionNumber }} | ||
- name: Create Draft Release | ||
id: draftrelease | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
name: "${{ steps.releasenotes.outputs.name }}" | ||
tag_name: "${{ steps.releasenotes.outputs.tag }}" | ||
target_commitish: stable | ||
generate_release_notes: false | ||
body: "${{ steps.releasenotes.outputs.notes }}" | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
prerelease: false | ||
draft: true | ||
- name: Promote draft release to live release | ||
run: | | ||
echo "ID: ${{ steps.draftrelease.outputs.id }}" | ||
curl -L \ | ||
-X PATCH \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
"https://api.github.com/repos/${{ github.repository }}/releases/${{ steps.draftrelease.outputs.id }}" \ | ||
-d '{"draft": false, "prerelease": false, "make_latest": true}' | ||
# uses: softprops/action-gh-release@v2 | ||
# with: | ||
# tag_name: "${{ steps.releasenotes.outputs.tag }}" | ||
# target_commitish: stable | ||
# token: ${{ secrets.GITHUB_TOKEN }} | ||
# draft: false | ||
# make_latest: true |
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