Skip to content

Commit

Permalink
Merge branch 'main' into brad/address-tab-feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
SlayterDev committed Apr 29, 2024
2 parents d938106 + 8762c13 commit dbf566b
Show file tree
Hide file tree
Showing 134 changed files with 2,918 additions and 1,875 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/bump_internal_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ jobs:
curl -fLSs "https://app.asana.com/api/1.0/tasks/${TASK_ID}?opt_fields=notes" \
-H "Authorization: Bearer ${ASANA_ACCESS_TOKEN}" \
| jq -r .data.notes \
| ./scripts/extract_release_notes.sh > release_notes.txt
release_notes="$(<release_notes.txt)"
if [[ ${#release_notes} == 0 || "$release_notes" == "<-- Add release notes here -->" ]]; then
echo "::error::Release notes are empty. Please add release notes to the Asana task and restart the workflow."
| ./scripts/extract_release_notes.sh -r > raw_release_notes.txt
raw_release_notes="$(<raw_release_notes.txt)"
if [[ ${#raw_release_notes} == 0 || "$raw_release_notes" == *"<-- Add release notes here -->"* ]]; then
echo "::error::Release notes are empty or contain a placeholder. Please add release notes to the Asana task and restart the workflow."
exit 1
fi
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/code_freeze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ jobs:
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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create_variants.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ jobs:
GH_TOKEN: ${{ github.token }}
WORKFLOW_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |
curl -fLSs $(gh api https://api.github.com/repos/${{ github.repository }}/contents/scripts/assets/variants-release-mm-template.json?ref=${{ github.ref }} --jq .download_url) \
curl -fLSs $(gh api https://api.github.com/repos/${{ github.repository }}/contents/scripts/assets/variants-release-mm-template.json --jq .download_url) \
--output message-template.json
export MM_USER_HANDLE=$(base64 -d <<< ${{ secrets.MM_HANDLES_BASE64 }} | jq ".${{ github.actor }}" | tr -d '"')
Expand Down
34 changes: 32 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,36 @@ jobs:
env:
SHELLCHECK_OPTS: -x -P scripts -P scripts/helpers

bats:

name: Test Shell Scripts

runs-on: macos-13

steps:
- name: Check out the code
if: github.event_name == 'pull_request' || github.event_name == 'push'
uses: actions/checkout@v4

- name: Check out the code
if: github.event_name != 'pull_request' && github.event_name != 'push'
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch || github.ref_name }}

- name: Install Bats
run: brew install bats-core

- name: Run Bats tests
run: bats --formatter junit scripts/tests/* > bats-tests.xml

- name: Publish unit tests report
uses: mikepenz/action-junit-report@v3
if: always() # always run even if the previous step fails
with:
check_name: "Test Report: Shell Scripts"
report_paths: 'bats-tests.xml'

tests:
name: Test

Expand Down Expand Up @@ -343,7 +373,7 @@ jobs:
create-asana-task:
name: Create Asana Task
needs: [swiftlint, tests, release-build, verify-autoconsent-bundle, private-api]
needs: [swiftlint, bats, tests, release-build, verify-autoconsent-bundle, private-api]

if: failure() && github.ref_name == 'main' && github.run_attempt == 1

Expand All @@ -360,7 +390,7 @@ jobs:

close-asana-task:
name: Close Asana Task
needs: [swiftlint, tests, release-build, verify-autoconsent-bundle, private-api]
needs: [swiftlint, bats, tests, release-build, verify-autoconsent-bundle, private-api]

if: success() && github.ref_name == 'main' && github.run_attempt > 1

Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/publish_dmg_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,14 @@ jobs:
run: |
curl -fLSs "https://app.asana.com/api/1.0/tasks/${TASK_ID}?opt_fields=notes" \
-H "Authorization: Bearer ${ASANA_ACCESS_TOKEN}" \
| jq -r .data.notes \
| ./scripts/extract_release_notes.sh > release_notes.txt
release_notes="$(<release_notes.txt)"
if [[ ${#release_notes} == 0 || "$release_notes" == "<-- Add release notes here -->" ]]; then
echo "::error::Release notes are empty. Please add release notes to the Asana task and restart the workflow."
| jq -r .data.notes > release_task_content.txt
raw_release_notes="$(./scripts/extract_release_notes.sh -r < release_task_content.txt)"
if [[ ${#raw_release_notes} == 0 || "$raw_release_notes" == *"<-- Add release notes here -->"* ]]; then
echo "::error::Release notes are empty or contain a placeholder. Please add release notes to the Asana task and restart the workflow."
exit 1
fi
echo "RELEASE_NOTES_FILE=release_notes.txt" >> $GITHUB_ENV
./scripts/extract_release_notes.sh < release_task_content.txt > release_notes.html
echo "RELEASE_NOTES_FILE=release_notes.html" >> $GITHUB_ENV
- name: Set up Sparkle tools
env:
Expand Down Expand Up @@ -189,21 +189,21 @@ jobs:
./scripts/appcast_manager/appcastManager.swift \
--release-to-internal-channel \
--dmg ${DMG_PATH} \
--release-notes release_notes.txt \
--release-notes-html release_notes.html \
--key sparkle_private_key
;;
"public")
./scripts/appcast_manager/appcastManager.swift \
--release-to-public-channel \
--version ${VERSION} \
--release-notes release_notes.txt \
--release-notes-html release_notes.html \
--key sparkle_private_key
;;
"hotfix")
./scripts/appcast_manager/appcastManager.swift \
--release-hotfix-to-public-channel \
--dmg ${DMG_PATH} \
--release-notes release_notes.txt \
--release-notes-html release_notes.html \
--key sparkle_private_key
;;
*)
Expand Down
2 changes: 1 addition & 1 deletion Configuration/BuildNumber.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CURRENT_PROJECT_VERSION = 175
CURRENT_PROJECT_VERSION = 176
Loading

0 comments on commit dbf566b

Please sign in to comment.