-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Automate release process with release please (#322)
- Loading branch information
Showing
22 changed files
with
391 additions
and
202 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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,13 @@ | ||
name: Build Documentation | ||
description: 'Build Documentation.' | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Install jazzy gem | ||
shell: bash | ||
run: gem install jazzy | ||
|
||
- name: Build Documentation | ||
shell: bash | ||
run: jazzy -o docs |
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,85 @@ | ||
# This is a composite to allow sharing these steps into other workflows. | ||
# For instance it could be used by regular CI as well as the release process. | ||
|
||
name: CI Workflow | ||
description: 'Shared CI workflow.' | ||
inputs: | ||
xcode-version: | ||
description: 'Which version of xcode should be installed' | ||
required: true | ||
ios-sim: | ||
description: 'iOS Simulator to use for testing' | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd | ||
with: | ||
xcode-version: ${{ inputs.xcode-version }} | ||
|
||
- name: Install mint and swiftlint | ||
shell: bash | ||
run: | | ||
brew tap mint-lang/mint-lang | ||
brew install mint-lang swiftlint libressl | ||
- name: Install cocoapods | ||
shell: bash | ||
run: gem install cocoapods | ||
|
||
- name: Lint the podspec | ||
shell: bash | ||
run: pod spec lint LaunchDarkly.podspec | ||
|
||
- name: Run swiftlint | ||
shell: bash | ||
run: | | ||
cd ./ContractTests | ||
swiftlint lint | ||
- name: Build for macOS | ||
shell: bash | ||
run: xcodebuild build -scheme 'LaunchDarkly_macOS' -sdk macosx -destination 'platform=macOS' | xcpretty | ||
|
||
- name: Build Tests for iOS device | ||
shell: bash | ||
run: xcodebuild build-for-testing -scheme 'LaunchDarkly_iOS' -sdk iphoneos CODE_SIGN_IDENTITY= | xcpretty | ||
|
||
- name: Build & Test on iOS Simulator | ||
shell: bash | ||
run: xcodebuild test -scheme 'LaunchDarkly_iOS' -sdk iphonesimulator -destination '${{ inputs.ios-sim }}' CODE_SIGN_IDENTITY= | xcpretty | ||
|
||
- name: Build for tvOS device | ||
shell: bash | ||
run: xcodebuild build -scheme 'LaunchDarkly_tvOS' -sdk appletvos CODE_SIGN_IDENTITY= | xcpretty | ||
|
||
- name: Build for tvOS Simulator | ||
shell: bash | ||
run: xcodebuild build -scheme 'LaunchDarkly_tvOS' -sdk appletvsimulator -destination 'platform=tvOS Simulator,name=Apple TV' | xcpretty | ||
|
||
- name: Build for watchOS simulator | ||
shell: bash | ||
run: xcodebuild build -scheme 'LaunchDarkly_watchOS' -sdk watchsimulator | xcpretty | ||
|
||
- name: Build for watchOS device | ||
shell: bash | ||
run: xcodebuild build -scheme 'LaunchDarkly_watchOS' -sdk watchos | xcpretty | ||
|
||
- name: Build & Test with swiftpm | ||
shell: bash | ||
run: swift test -v | ||
|
||
- name: Build contract tests | ||
shell: bash | ||
run: make build-contract-tests | ||
|
||
- name: Start contract tests in background | ||
shell: bash | ||
run: make start-contract-test-service-bg | ||
|
||
- name: Run contract tests | ||
shell: bash | ||
# Add a brief sleep here to ensure the test service is ready to receive | ||
# requests | ||
run: sleep 5 && make run-contract-tests |
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,15 @@ | ||
name: Publish Documentation | ||
description: 'Publish the documentation to GitHub pages' | ||
inputs: | ||
token: | ||
description: 'Token to use for publishing.' | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- uses: launchdarkly/gh-actions/actions/publish-pages@publish-pages-v1.0.1 | ||
name: 'Publish to GitHub pages' | ||
with: | ||
docs_path: docs | ||
github_token: ${{ inputs.token }} |
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,14 @@ | ||
name: Publish Package | ||
description: 'Publish the package to Cocoapods' | ||
inputs: | ||
dry_run: | ||
description: 'Is this a dry run. If so no package will be published.' | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Push to cocoapods | ||
if: ${{ inputs.dry_run == 'false' }} | ||
shell: bash | ||
run: pod trunk push LaunchDarkly.podspec --allow-warnings --verbose |
Oops, something went wrong.