-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: Automate release process with release please #322
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
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 |
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 | ||
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 }} |
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Guessing the tool itself doesn't have a dry run mode? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct. I did check originally but it doesn't appear to support it. We do perform a pod spec lint every time and that pretty much does everything except push so we should be somewhat shielded. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explanation of the sleep would be good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.