Skip to content

Commit 1cd1aca

Browse files
authored
Merge branch 'main' into chore/idclaim-sub-default
2 parents 65374cc + ff0a96c commit 1cd1aca

File tree

395 files changed

+18427
-2184
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

395 files changed

+18427
-2184
lines changed

.github/workflows/closed_issue_message.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
auto_comment:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: aws-actions/closed-issue-message@v1
11+
- uses: aws-actions/closed-issue-message@36b7048ea77bb834d16e7a7c5b5471ac767a4ca1 # v1
1212
with:
1313
# These inputs are both required
1414
repo-token: "${{ secrets.GITHUB_TOKEN }}"

.github/workflows/codecov_code_coverage.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ on:
88
push:
99
branches:
1010
- 'main'
11-
- 'dev-preview'
11+
- 'v1'
1212
pull_request:
1313
branches:
1414
- 'main'
15-
- 'dev-preview'
15+
- 'v1'
1616

1717
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1818
jobs:
@@ -24,10 +24,10 @@ jobs:
2424
# Steps represent a sequence of tasks that will be executed as part of the job
2525
steps:
2626
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
27-
- uses: actions/checkout@v2
27+
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
2828
# Execute unit tests
2929
- name: Setup Java
30-
uses: actions/setup-java@v3
30+
uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # v3
3131
with:
3232
java-version: '11'
3333
distribution: 'corretto'
@@ -45,4 +45,4 @@ jobs:
4545
uses: codecov/codecov-action@v3
4646
with:
4747
name: report
48-
files: code-coverage/*.xml
48+
files: code-coverage/*.xml

.github/workflows/gradle.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ jobs:
1515
runs-on: ubuntu-latest
1616

1717
steps:
18-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
1919
- name: Set up JDK 11
20-
uses: actions/setup-java@v1
20+
uses: actions/setup-java@b6e674f4b717d7b0ae3baee0fbe79f498905dfde # v1
2121
with:
2222
java-version: 11
2323
- name: Grant execute permission for gradlew

.github/workflows/maven_release_publisher.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Configure AWS Credentials
14-
uses: aws-actions/configure-aws-credentials@v1
14+
uses: aws-actions/configure-aws-credentials@67fbcbb121271f7775d2e7715933280b06314838 # v1
1515
with:
1616
role-to-assume: ${{ secrets.AMPLIFY_ANDROID_RELEASE_PUBLISHER_ROLE }}
1717
aws-region: us-east-1
1818
- name: Start Integration Test
19-
uses: aws-actions/aws-codebuild-run-build@v1
19+
uses: aws-actions/aws-codebuild-run-build@f202c327329cbbebd13f986f74af162a8539b5fd # v1
2020
with:
2121
project-name: AmplifyAndroid-IntegrationTest
2222
env-vars-for-codebuild: |
@@ -26,11 +26,11 @@ jobs:
2626
ORG_GRADLE_PROJECT_useAwsSdkReleaseBuild: true
2727
NUMBER_OF_DEVICES_TO_TEST: 3
2828
- name: Configure AWS Credentials
29-
uses: aws-actions/configure-aws-credentials@v1
29+
uses: aws-actions/configure-aws-credentials@67fbcbb121271f7775d2e7715933280b06314838 # v1
3030
with:
3131
role-to-assume: ${{ secrets.AMPLIFY_ANDROID_RELEASE_PUBLISHER_ROLE }}
3232
aws-region: us-east-1
3333
- name: Start Maven Release Build
34-
uses: aws-actions/aws-codebuild-run-build@v1
34+
uses: aws-actions/aws-codebuild-run-build@f202c327329cbbebd13f986f74af162a8539b5fd # v1
3535
with:
3636
project-name: AmplifyAndroid-ReleasePublisher

.github/workflows/notify_comments.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@ jobs:
2424
env:
2525
WEBHOOK_URL: ${{ secrets.SLACK_COMMENT_WEBHOOK_URL }}
2626
BODY: ${{ toJson(github.event.comment.body) }}
27+
COMMENT_URL: ${{github.event.comment.html_url}}
2728
shell: bash
28-
run: echo $BODY | xargs -I {} curl -s POST "$WEBHOOK_URL" -H "Content-Type:application/json" --data '{"issue":"${{github.event.comment.html_url}}", "body":"{}"}'
29+
run: echo $BODY | xargs -I {} curl -s POST "$WEBHOOK_URL" -H "Content-Type:application/json" --data '{"body":"{}", "issue":"'$COMMENT_URL'"}'

.github/workflows/notify_release.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ jobs:
2121
- name: Run webhook curl command
2222
env:
2323
WEBHOOK_URL: ${{ secrets.SLACK_RELEASE_WEBHOOK_URL }}
24+
VERSION: ${{github.event.release.html_url}}
25+
REPO_URL: ${{github.event.repository.html_url}}
26+
ACTION_NAME: ${{github.event.action}}
2427
shell: bash
25-
run: curl -s POST "$WEBHOOK_URL" -H "Content-Type:application/json" --data '{"action":"${{github.event.action}}", "repo":"${{github.event.repository.html_url}}", "version":"${{github.event.release.html_url}}"}'
28+
run: echo $VERSION | xargs -I {} curl -s POST "$WEBHOOK_URL" -H "Content-Type:application/json" --data '{"action":"'$ACTION_NAME'", "repo":"'$REPO_URL'", "version":"{}"}'
2629

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Publish Rollback Artifacts
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
publish_rollback:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
id-token: write
11+
steps:
12+
- name: Configure AWS Credentials
13+
uses: aws-actions/configure-aws-credentials@5fd3084fc36e372ff1fff382a39b10d03659f355 #2.2.0
14+
with:
15+
role-to-assume: ${{ secrets.AMPLIFY_ANDROID_RELEASE_PUBLISHER_ROLE }}
16+
aws-region: us-east-1
17+
- name: Start Maven Release Build
18+
uses: aws-actions/aws-codebuild-run-build@d5a04846cedab61a0b7c897af0548af0d8fb14fb #1.0.12
19+
with:
20+
project-name: AmplifyAndroid-ReleasePublisher-V2

.github/workflows/release_pr.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
env:
1010
GIT_USER_NAME: amplify-android-dev+ghops
1111
GIT_USER_EMAIL: [email protected]
12-
BASE_BRANCH: ${{ github.event.ref }}
12+
BASE_BRANCH: ${{ github.ref_name }}
1313
jobs:
1414
create_pr_for_next_release:
1515
runs-on: ubuntu-latest
@@ -19,7 +19,7 @@ jobs:
1919
sudo add-apt-repository -y ppa:git-core/ppa
2020
sudo apt-get update
2121
sudo apt-get install git -y
22-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
2323
with:
2424
ref: ${{ env.BASE_BRANCH }}
2525
fetch-depth: 0

.github/workflows/release_pr_approval_count.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
&& startsWith(github.event.pull_request.title, 'release:')
1515
}}
1616
steps:
17-
- uses: actions/github-script@v3
17+
- uses: actions/github-script@ffc2c79a5b2490bd33e0a41c1de74b877714d736 # v3
1818
id: get_approval_count
1919
with:
2020
github-token: ${{secrets.GITHUB_TOKEN}}
+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Rollback Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
branch_from:
7+
description: 'The known good version to re-release (e.g. 2.9.1)'
8+
required: true
9+
deprecated_version:
10+
description: 'The version you are rolling back (e.g. 2.9.2)'
11+
required: true
12+
new_version:
13+
description: 'The new version number (e.g. 2.9.3)'
14+
15+
16+
17+
jobs:
18+
rollback-release:
19+
runs-on: ubuntu-latest
20+
env:
21+
AWS_REGION: "us-east-1"
22+
BRANCH_FROM: ${{ inputs.branch_from }}
23+
DEPRECATED_VERSION: ${{ inputs.deprecated_version }}
24+
NEW_VERSION: ${{ inputs.new_version }}
25+
CI_COMMIT_MESSAGE: Re-release v${{ inputs.branch_from }} as v${{ inputs.new_version }}
26+
ROLLBACK_BRANCH: rollback_${{ inputs.deprecated_version }}
27+
NEW_TAG: release_v${{ inputs.new_version }}
28+
permissions:
29+
id-token: write
30+
contents: write
31+
actions: write
32+
steps:
33+
- name: Checkout Source Code
34+
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
35+
with:
36+
ref: ${{ format('release_v{0}', env.BRANCH_FROM) }}
37+
token: ${{ secrets.GH_WORKFLOW_TOKEN }}
38+
- name: Create Rollback Branch
39+
run: git checkout -b ${{ env.ROLLBACK_BRANCH }}
40+
- name: Update Version
41+
run: |
42+
git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com
43+
git config --global user.name github-actions[bot]
44+
sed -i 's/POM_VERSION=${{ env.BRANCH_FROM }}/POM_VERSION=${{ env.NEW_VERSION }}/g' gradle.properties
45+
echo -e '## [Release ${{ env.NEW_VERSION }}](https://github.com/${{ github.repository }}/releases/tag/${{ env.NEW_TAG }})\n\nThis is a re-release of version ${{ env.BRANCH_FROM }}. Use this instead of version ${{ env.DEPRECATED_VERSION }}.\n' | cat - CHANGELOG.md > temp && mv temp CHANGELOG.md
46+
git add gradle.properties
47+
git add CHANGELOG.md
48+
git commit -m "${{ env.CI_COMMIT_MESSAGE }}"
49+
- name: Tag Version
50+
run: git tag "${{ env.NEW_TAG }}"
51+
- name: Push Changes
52+
run: git push --atomic origin ${{ env.ROLLBACK_BRANCH }} ${{ env.NEW_TAG }}
53+
- name: Run Publish
54+
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
55+
with:
56+
# The aws-codebuild-run-build action automatically passes the source version that the workflow
57+
# is run on to Codebuild, and there is no override option. In order to run the Codebuild
58+
# release with our newly-created tag version we dispatch another workflow on that tag.
59+
script: |
60+
github.rest.actions.createWorkflowDispatch({
61+
owner: context.repo.owner,
62+
repo: context.repo.repo,
63+
workflow_id: 'rollback_publish.yml',
64+
ref: "${{ env.NEW_TAG }}",
65+
})

.github/workflows/stale.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
stale:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/stale@v4
11+
- uses: actions/stale@a20b814fb01b71def3bd6f56e7494d667ddf28da # v4
1212
with:
1313
repo-token: ${{ secrets.GITHUB_TOKEN }}
1414
operations-per-run: 200
@@ -21,4 +21,4 @@ jobs:
2121
# PRs wont go stale
2222
days-before-pr-stale: -1
2323
# Issues with any of these labels are checked.
24-
any-of-labels: "pending-response, closing soon"
24+
any-of-labels: "pending-response, closing soon"

.idea/codeStyles/Project.xml

+42-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)