Skip to content
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

Merged
merged 3 commits into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
169 changes: 0 additions & 169 deletions .circleci/config.yml

This file was deleted.

13 changes: 0 additions & 13 deletions .circleci/run-build-locally.sh

This file was deleted.

17 changes: 6 additions & 11 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ assignees: ''

---

**Is this a support request?**
This issue tracker is maintained by LaunchDarkly SDK developers and is intended for feedback on the SDK code. If you're not sure whether the problem you are having is specifically related to the SDK, or to the LaunchDarkly service overall, it may be more appropriate to contact the LaunchDarkly support team; they can help to investigate the problem and will consult the SDK team if necessary. You can submit a support request by going [here](https://support.launchdarkly.com/hc/en-us/requests/new) or by emailing support@launchdarkly.com.

Note that issues filed on this issue tracker are publicly accessible. Do not provide any private account information on your issues. If your problem is specific to your account, you should submit a support request as described above.

**Describe the bug**
A clear and concise description of what the bug is.

Expand All @@ -24,14 +19,14 @@ A clear and concise description of what you expected to happen.
**Logs**
If applicable, add any log output related to your problem.

**SDK version**
The version of this SDK that you are using.
**Library version**
The version that you are using.

**Language version, developer tools**
For instance, Go 1.11 or Ruby 2.5.3. If you are using a language that requires a separate compiler, such as C, please include the name and version of the compiler too.
**XCode and Swift version**
For instance, XCode 11.5, Swift 5.1.

**OS/platform**
For instance, Ubuntu 16.04, Windows 10, or Android 4.0.3. If your code is running in a browser, please also include the browser type and version.
**Platform the issue occurs on**
iPhone, iPad, macOS, tvOS, or watchOS.

**Additional context**
Add any other context about the problem here.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ assignees: ''
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I would love to see the SDK [...does something new...]
A clear and concise description of what the problem is. Ex. I would love to see the library [...does something new...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.
Expand Down
13 changes: 13 additions & 0 deletions .github/actions/build-docs/action.yml
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
85 changes: 85 additions & 0 deletions .github/actions/ci/action.yml
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
Copy link
Contributor

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

15 changes: 15 additions & 0 deletions .github/actions/publish-docs/action.yml
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 }}
14 changes: 14 additions & 0 deletions .github/actions/publish/action.yml
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guessing the tool itself doesn't have a dry run mode?

Copy link
Member Author

Choose a reason for hiding this comment

The 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.

Loading