-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
99 additions
and
133 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,12 +18,12 @@ jobs: | |
|
||
steps: | ||
|
||
- name: Assert main branch | ||
run: | | ||
if [ "${{ github.ref_name }}" != "main" ]; then | ||
echo "👎 Not the main branch" | ||
exit 1 | ||
fi | ||
# - name: Assert main branch | ||
# run: | | ||
# if [ "${{ github.ref_name }}" != "main" ]; then | ||
# echo "👎 Not the main branch" | ||
# exit 1 | ||
# fi | ||
|
||
- name: Check out the code | ||
uses: actions/checkout@v4 | ||
|
@@ -36,135 +36,101 @@ jobs: | |
|
||
- name: Make release branch | ||
id: make_release_branch | ||
env: | ||
APPLE_API_KEY_BASE64: ${{ secrets.APPLE_API_KEY_BASE64 }} | ||
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }} | ||
APPLE_API_KEY_ISSUER: ${{ secrets.APPLE_API_KEY_ISSUER }} | ||
run: | | ||
git config --global user.name "Dax the Duck" | ||
git config --global user.email "[email protected]" | ||
bundle exec fastlane make_release_branch | ||
- name: Get Asana user ID | ||
id: get-asana-user-id | ||
shell: bash | ||
run: bundle exec fastlane run asana_get_user_id_for_github_handle github_handle:"${{ github.actor }}" | ||
|
||
- name: Create release task | ||
id: create_release_task | ||
env: | ||
ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }} | ||
ASSIGNEE_ID: ${{ steps.get-asana-user-id.outputs.asana_user_id }} | ||
run: | | ||
version="$(echo ${{ steps.make_release_branch.outputs.release_branch_name }} | cut -d '/' -f 2)" | ||
task_name="macOS App Release $version" | ||
asana_task_id="$(curl -fLSs -X POST "https://app.asana.com/api/1.0/task_templates/${{ vars.MACOS_RELEASE_TASK_TEMPLATE_ID }}/instantiateTask" \ | ||
-H "Authorization: Bearer ${{ env.ASANA_ACCESS_TOKEN }}" \ | ||
-H "Content-Type: application/json" \ | ||
-d "{ \"data\": { \"name\": \"$task_name\" }}" \ | ||
| jq -r .data.new_task.gid)" | ||
echo "marketing_version=${version}" >> $GITHUB_OUTPUT | ||
echo "asana_task_id=${asana_task_id}" >> $GITHUB_OUTPUT | ||
echo "asana_task_url=https://app.asana.com/0/0/${asana_task_id}/f" >> $GITHUB_OUTPUT | ||
curl -fLSs -X POST "https://app.asana.com/api/1.0/sections/${{ vars.MACOS_APP_DEVELOPMENT_RELEASE_SECTION_ID }}/addTask" \ | ||
-H "Authorization: Bearer ${{ env.ASANA_ACCESS_TOKEN }}" \ | ||
-H "Content-Type: application/json" \ | ||
--output /dev/null \ | ||
-d "{\"data\": {\"task\": \"${asana_task_id}\"}}" | ||
curl -fLSs -X PUT "https://app.asana.com/api/1.0/tasks/${asana_task_id}" \ | ||
-H "Authorization: Bearer ${{ env.ASANA_ACCESS_TOKEN }}" \ | ||
-H "Content-Type: application/json" \ | ||
--output /dev/null \ | ||
-d "{ \"data\": { \"assignee\": \"$ASSIGNEE_ID\" }}" | ||
- name: Update Asana tasks for the release | ||
env: | ||
ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }} | ||
GH_TOKEN: ${{ github.token }} | ||
run: | | ||
./scripts/update_asana_for_release.sh \ | ||
internal \ | ||
${{ steps.create_release_task.outputs.asana_task_id }} \ | ||
${{ vars.MACOS_APP_BOARD_VALIDATION_SECTION_ID }} \ | ||
${{ steps.create_release_task.outputs.marketing_version }} | ||
run_tests: | ||
|
||
name: Run Tests | ||
|
||
needs: create_release_branch | ||
uses: ./.github/workflows/pr.yml | ||
with: | ||
branch: ${{ needs.create_release_branch.outputs.release_branch_name }} | ||
secrets: | ||
APPLE_API_KEY_BASE64: ${{ secrets.APPLE_API_KEY_BASE64 }} | ||
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }} | ||
APPLE_API_KEY_ISSUER: ${{ secrets.APPLE_API_KEY_ISSUER }} | ||
ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }} | ||
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} | ||
SSH_PRIVATE_KEY_FASTLANE_MATCH: ${{ secrets.SSH_PRIVATE_KEY_FASTLANE_MATCH }} | ||
|
||
increment_build_number: | ||
|
||
name: Increment Build Number | ||
|
||
needs: [ create_release_branch, run_tests ] | ||
runs-on: macos-14-xlarge | ||
timeout-minutes: 10 | ||
|
||
steps: | ||
|
||
- name: Check out the code | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
ref: ${{ needs.create_release_branch.outputs.release_branch_name }} | ||
|
||
- name: Prepare fastlane | ||
run: bundle install | ||
|
||
- name: Increment build number | ||
env: | ||
APPLE_API_KEY_BASE64: ${{ secrets.APPLE_API_KEY_BASE64 }} | ||
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }} | ||
APPLE_API_KEY_ISSUER: ${{ secrets.APPLE_API_KEY_ISSUER }} | ||
run: | | ||
git config --global user.name "Dax the Duck" | ||
git config --global user.email "[email protected]" | ||
bundle exec fastlane bump_internal_release update_embedded_files:false | ||
prepare_release: | ||
name: Prepare Release | ||
needs: [ create_release_branch, increment_build_number ] | ||
uses: ./.github/workflows/release.yml | ||
with: | ||
asana-task-url: ${{ needs.create_release_branch.outputs.asana_task_url }} | ||
branch: ${{ needs.create_release_branch.outputs.release_branch_name }} | ||
secrets: | ||
APPLE_API_KEY_BASE64: ${{ secrets.APPLE_API_KEY_BASE64 }} | ||
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }} | ||
APPLE_API_KEY_ISSUER: ${{ secrets.APPLE_API_KEY_ISSUER }} | ||
ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_ACCESS_KEY_ID_RELEASE_S3: ${{ secrets.AWS_ACCESS_KEY_ID_RELEASE_S3 }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_SECRET_ACCESS_KEY_RELEASE_S3: ${{ secrets.AWS_SECRET_ACCESS_KEY_RELEASE_S3 }} | ||
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} | ||
MM_HANDLES_BASE64: ${{ secrets.MM_HANDLES_BASE64 }} | ||
MM_WEBHOOK_URL: ${{ secrets.MM_WEBHOOK_URL }} | ||
SSH_PRIVATE_KEY_FASTLANE_MATCH: ${{ secrets.SSH_PRIVATE_KEY_FASTLANE_MATCH }} | ||
|
||
tag_and_merge: | ||
name: Tag and Merge Branch | ||
needs: [ create_release_branch, prepare_release ] | ||
uses: ./.github/workflows/tag_release.yml | ||
with: | ||
asana-task-url: ${{ needs.create_release_branch.outputs.asana_task_url }} | ||
base-branch: ${{ github.ref_name }} | ||
branch: ${{ needs.create_release_branch.outputs.release_branch_name }} | ||
prerelease: true | ||
secrets: | ||
ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }} | ||
GHA_ELEVATED_PERMISSIONS_TOKEN: ${{ secrets.GHA_ELEVATED_PERMISSIONS_TOKEN }} | ||
bundle exec fastlane run start_new_release \ | ||
platform:"macos" \ | ||
github_handle:"${{ github.actor }}" | ||
# - name: Update Asana tasks for the release | ||
# env: | ||
# ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }} | ||
# GH_TOKEN: ${{ github.token }} | ||
# run: | | ||
# ./scripts/update_asana_for_release.sh \ | ||
# internal \ | ||
# ${{ steps.create_release_task.outputs.asana_task_id }} \ | ||
# ${{ vars.MACOS_APP_BOARD_VALIDATION_SECTION_ID }} \ | ||
# ${{ steps.create_release_task.outputs.marketing_version }} | ||
|
||
# run_tests: | ||
|
||
# name: Run Tests | ||
|
||
# needs: create_release_branch | ||
# uses: ./.github/workflows/pr.yml | ||
# with: | ||
# branch: ${{ needs.create_release_branch.outputs.release_branch_name }} | ||
# secrets: | ||
# APPLE_API_KEY_BASE64: ${{ secrets.APPLE_API_KEY_BASE64 }} | ||
# APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }} | ||
# APPLE_API_KEY_ISSUER: ${{ secrets.APPLE_API_KEY_ISSUER }} | ||
# ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }} | ||
# MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} | ||
# SSH_PRIVATE_KEY_FASTLANE_MATCH: ${{ secrets.SSH_PRIVATE_KEY_FASTLANE_MATCH }} | ||
|
||
# increment_build_number: | ||
|
||
# name: Increment Build Number | ||
|
||
# needs: [ create_release_branch, run_tests ] | ||
# runs-on: macos-14-xlarge | ||
# timeout-minutes: 10 | ||
|
||
# steps: | ||
|
||
# - name: Check out the code | ||
# uses: actions/checkout@v4 | ||
# with: | ||
# submodules: recursive | ||
# ref: ${{ needs.create_release_branch.outputs.release_branch_name }} | ||
|
||
# - name: Prepare fastlane | ||
# run: bundle install | ||
|
||
# - name: Increment build number | ||
# env: | ||
# APPLE_API_KEY_BASE64: ${{ secrets.APPLE_API_KEY_BASE64 }} | ||
# APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }} | ||
# APPLE_API_KEY_ISSUER: ${{ secrets.APPLE_API_KEY_ISSUER }} | ||
# run: | | ||
# git config --global user.name "Dax the Duck" | ||
# git config --global user.email "[email protected]" | ||
# bundle exec fastlane bump_internal_release update_embedded_files:false | ||
|
||
# prepare_release: | ||
# name: Prepare Release | ||
# needs: [ create_release_branch, increment_build_number ] | ||
# uses: ./.github/workflows/release.yml | ||
# with: | ||
# asana-task-url: ${{ needs.create_release_branch.outputs.asana_task_url }} | ||
# branch: ${{ needs.create_release_branch.outputs.release_branch_name }} | ||
# secrets: | ||
# APPLE_API_KEY_BASE64: ${{ secrets.APPLE_API_KEY_BASE64 }} | ||
# APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }} | ||
# APPLE_API_KEY_ISSUER: ${{ secrets.APPLE_API_KEY_ISSUER }} | ||
# ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }} | ||
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
# AWS_ACCESS_KEY_ID_RELEASE_S3: ${{ secrets.AWS_ACCESS_KEY_ID_RELEASE_S3 }} | ||
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
# AWS_SECRET_ACCESS_KEY_RELEASE_S3: ${{ secrets.AWS_SECRET_ACCESS_KEY_RELEASE_S3 }} | ||
# MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} | ||
# MM_HANDLES_BASE64: ${{ secrets.MM_HANDLES_BASE64 }} | ||
# MM_WEBHOOK_URL: ${{ secrets.MM_WEBHOOK_URL }} | ||
# SSH_PRIVATE_KEY_FASTLANE_MATCH: ${{ secrets.SSH_PRIVATE_KEY_FASTLANE_MATCH }} | ||
|
||
# tag_and_merge: | ||
# name: Tag and Merge Branch | ||
# needs: [ create_release_branch, prepare_release ] | ||
# uses: ./.github/workflows/tag_release.yml | ||
# with: | ||
# asana-task-url: ${{ needs.create_release_branch.outputs.asana_task_url }} | ||
# base-branch: ${{ github.ref_name }} | ||
# branch: ${{ needs.create_release_branch.outputs.release_branch_name }} | ||
# prerelease: true | ||
# secrets: | ||
# ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }} | ||
# GHA_ELEVATED_PERMISSIONS_TOKEN: ${{ secrets.GHA_ELEVATED_PERMISSIONS_TOKEN }} |