Skip to content

Commit b7879ad

Browse files
authored
chore: kickoff release
2 parents f970384 + 4be0d8f commit b7879ad

File tree

8 files changed

+180
-139
lines changed

8 files changed

+180
-139
lines changed

.circleci/config.yml

Lines changed: 0 additions & 115 deletions
This file was deleted.

.github/workflows/build-and-test.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: Build and Test
2+
on:
3+
workflow_call:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
branches:
10+
- main
11+
12+
permissions:
13+
contents: read
14+
15+
concurrency:
16+
group: ${{ github.head_ref || github.run_id }}
17+
cancel-in-progress: true
18+
19+
jobs:
20+
build-test-ios:
21+
runs-on: macos-latest
22+
steps:
23+
- name: Checkout repo
24+
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
25+
with:
26+
persist-credentials: false
27+
28+
- name: Setup Ruby
29+
uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # v1.152.0
30+
with:
31+
ruby-version: '3.2.1'
32+
bundler-cache: true
33+
34+
- name: Run unit tests
35+
run: bundle exec fastlane ios tests
36+
37+
- name: Run integration tests
38+
run: bundle exec fastlane ios integration_tests
39+
40+
build-test-macos:
41+
runs-on: macos-latest
42+
steps:
43+
- name: Checkout repo
44+
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
45+
with:
46+
persist-credentials: false
47+
48+
- name: Setup Ruby
49+
uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # v1.152.0
50+
with:
51+
ruby-version: '3.2.1'
52+
bundler-cache: true
53+
54+
- name: Run unit tests
55+
run: bundle exec fastlane mac tests
56+
57+
build-test-tvos:
58+
runs-on: macos-latest
59+
steps:
60+
- name: Checkout repo
61+
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
62+
with:
63+
persist-credentials: false
64+
65+
- name: Setup Ruby
66+
uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # v1.152.0
67+
with:
68+
ruby-version: '3.2.1'
69+
bundler-cache: true
70+
71+
- name: Run unit tests
72+
run: bundle exec fastlane tvos tests
73+
74+
build-test-watchos:
75+
runs-on: macos-latest
76+
steps:
77+
- name: Checkout repo
78+
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
79+
with:
80+
persist-credentials: false
81+
82+
- name: Setup Ruby
83+
uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # v1.152.0
84+
with:
85+
ruby-version: '3.2.1'
86+
bundler-cache: true
87+
88+
- name: Run unit tests
89+
run: bundle exec fastlane watchos tests
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Dependency Review
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
dependency-review:
13+
name: Dependency Review
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout Code
17+
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
18+
with:
19+
persist-credentials: false
20+
21+
- name: Dependency Review
22+
uses: actions/dependency-review-action@7d90b4f05fea31dde1c4a1fb3fa787e197ea93ab # v3.0.7
23+
with:
24+
config-file: aws-amplify/amplify-ci-support/.github/dependency-review-config.yml@main

.github/workflows/release-kickoff.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release new version
1+
name: Kick off new release
22

33
on:
44
workflow_dispatch

.github/workflows/release.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Release new version
2+
on:
3+
push:
4+
branches:
5+
- release
6+
7+
permissions:
8+
id-token: write
9+
contents: write
10+
jobs:
11+
build-and-test:
12+
uses: ./.github/workflows/build-and-test.yml
13+
14+
release:
15+
environment: Release
16+
needs: [build-and-test]
17+
runs-on: macos-latest
18+
steps:
19+
- name: Configure AWS credentials
20+
uses: aws-actions/configure-aws-credentials@5fd3084fc36e372ff1fff382a39b10d03659f355 #v2
21+
with:
22+
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
23+
role-session-name: ${{ format('{0}.release', github.run_id) }}
24+
aws-region: ${{ secrets.AWS_REGION }}
25+
26+
- id: retrieve-token
27+
name: Retrieve Token
28+
env:
29+
DEPLOY_SECRET_ARN: ${{ secrets.DEPLOY_SECRET_ARN }}
30+
run: |
31+
PAT=$(aws secretsmanager get-secret-value \
32+
--secret-id "$DEPLOY_SECRET_ARN" \
33+
| jq -r ".SecretString | fromjson | .Credential")
34+
echo "token=$PAT" >> $GITHUB_OUTPUT
35+
36+
- name: Checkout repo
37+
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
38+
with:
39+
fetch-depth: 10
40+
token: ${{steps.retrieve-token.outputs.token}}
41+
42+
- name: Setup Ruby
43+
uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # v1.152.0
44+
with:
45+
ruby-version: '3.2.1'
46+
bundler-cache: true
47+
48+
- name: Fetch tags
49+
run: git fetch --tags origin
50+
51+
- name: Publish new version to cocoapods trunk
52+
env:
53+
COCOAPODS_SECRET_ARN: ${{ secrets.COCOAPODS_SECRET_ARN }}
54+
GITHUB_EMAIL: aws-amplify-ops@amazon.com
55+
GITHUB_USER: aws-amplify-ops
56+
run: bundle exec fastlane ios release
57+
58+
- name: Publish documentation
59+
run: bundle exec fastlane ios publish_doc

Gemfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ GEM
1111
specs:
1212
CFPropertyList (3.0.6)
1313
rexml
14-
activesupport (6.1.7.3)
14+
activesupport (6.1.7.6)
1515
concurrent-ruby (~> 1.0, >= 1.0.2)
1616
i18n (>= 1.6, < 2)
1717
minitest (>= 5.1)
@@ -209,7 +209,7 @@ GEM
209209
http-cookie (1.0.5)
210210
domain_name (~> 0.5)
211211
httpclient (2.8.3)
212-
i18n (1.12.0)
212+
i18n (1.14.1)
213213
concurrent-ruby (~> 1.0)
214214
jazzy (0.14.3)
215215
cocoapods (~> 1.5)
@@ -229,7 +229,7 @@ GEM
229229
mini_magick (4.12.0)
230230
mini_mime (1.1.2)
231231
mini_portile2 (2.8.1)
232-
minitest (5.18.0)
232+
minitest (5.19.0)
233233
molinillo (0.8.0)
234234
multi_json (1.15.0)
235235
multipart-post (2.0.0)
@@ -300,7 +300,7 @@ GEM
300300
rouge (~> 2.0.7)
301301
xcpretty-travis-formatter (1.0.1)
302302
xcpretty (~> 0.2, >= 0.0.7)
303-
zeitwerk (2.6.7)
303+
zeitwerk (2.6.11)
304304

305305
PLATFORMS
306306
ruby

Sources/AmplifyUtilsNotifications/AUNotificationPermissions.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ import UserNotifications
1010

1111
#if canImport(WatchKit)
1212
import WatchKit
13-
#elseif canImport(AppKit)
14-
import AppKit
15-
typealias Application = NSApplication
1613
#elseif canImport(UIKit)
1714
import UIKit
1815
typealias Application = UIApplication
16+
#elseif canImport(AppKit)
17+
import AppKit
18+
typealias Application = NSApplication
1919
#endif
2020

2121
@available(iOSApplicationExtension, unavailable)

fastlane/Fastfile

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ PODSPEC_PATH = "AmplifyUtilsNotifications.podspec"
44
CHANGELOG_PATH = "CHANGELOG.md"
55

66
platform :ios do
7-
before_all do
8-
setup_circle_ci
9-
end
10-
117
desc "Run all the tests on iOS"
128
lane :tests do
139
run_tests(
@@ -137,10 +133,6 @@ platform :ios do
137133
end
138134

139135
platform :mac do
140-
before_all do
141-
setup_circle_ci
142-
end
143-
144136
desc "Run all the tests on macOS"
145137
lane :tests do
146138
run_tests(
@@ -156,10 +148,6 @@ platform :mac do
156148
end
157149

158150
platform :tvos do
159-
before_all do
160-
setup_circle_ci
161-
end
162-
163151
desc "Run all the tests on tvOS"
164152
lane :tests do
165153
run_tests(
@@ -175,10 +163,6 @@ platform :tvos do
175163
end
176164

177165
platform :watchos do
178-
before_all do
179-
setup_circle_ci
180-
end
181-
182166
desc "Run all the tests on watchOS"
183167
lane :tests do
184168
run_tests(

0 commit comments

Comments
 (0)