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

[SDTEST-1351] creating tag and release after build to avoid errors #154

Merged
merged 2 commits into from
Dec 18, 2024
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
10 changes: 7 additions & 3 deletions .github/workflows/createRelease.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
name: Create new release

on:
release:
types: [created]
workflow_dispatch:
inputs:
version:
description: 'Release Version'
required: true
type: string

permissions:
contents: read
Expand Down Expand Up @@ -39,7 +43,7 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
run: make XC_LOG=archive version=${{ github.event.release.tag_name }} github
run: make XC_LOG=archive version=${{ github.event.inputs.version }} github_release
- name: Attach Xcode logs
if: '!cancelled()'
uses: actions/upload-artifact@v4
Expand Down
22 changes: 11 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,23 +82,23 @@ release:
@$(MAKE) build
@$(MAKE) set_hash

github: release
github_release: release
@:$(call check_defined, GH_TOKEN, GitHub token)
@:$(call check_defined, COCOAPODS_TRUNK_TOKEN, CocoaPods trunk token)
# Upload binary file to GitHub release
brew list gh &>/dev/null || brew install gh
# upload xcframework
gh release upload $(version) ./build/xcframework/DatadogSDKTesting.zip --clobber
# upload symbols
# Commit updated xcodeproj and Package.swift
@git add Package.swift DatadogSDKTesting.podspec DatadogSDKTesting.xcodeproj/project.pbxproj
@git checkout -b release-$(version)
@git commit -m "Updated binary package version to $(version)"
@git tag -f $(version)
@git push -f --tags origin release-$(version)
# rename symbols file
@rm -f build/symbols/DatadogSDKTesting.symbols.zip
@mv build/symbols/DatadogSDKTesting.zip build/symbols/DatadogSDKTesting.symbols.zip
gh release upload $(version) ./build/symbols/DatadogSDKTesting.symbols.zip --clobber
# Commit updated xcodeproj, Package.swift and DatadogSDKTesting.podspec
git add Package.swift DatadogSDKTesting.podspec DatadogSDKTesting.xcodeproj/project.pbxproj
git checkout -b update-binary
git commit -m "Updated binary package version to $(version)"
git tag -f $(version)
git push -f --tags origin update-binary
# make github release
@gh release create $(version) --draft --verify-tag --generate-notes \
build/xcframework/DatadogSDKTesting.zip build/symbols/DatadogSDKTesting.symbols.zip
# Push Podfile
pod trunk push --allow-warnings DatadogSDKTesting.podspec

Expand Down
14 changes: 4 additions & 10 deletions RELEASEMANAGEMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,10 @@

These are the necessary steps to release a version of the framework:

1. In a terminal window, move to the root folder of `dd-sdk-swift-testing` project
2. Confirm you are in `main` branch
3. Run `make bump` and write the version number you want to release
4. Commit and push the change to the repository
5. In Github create a new release: [https://github.com/DataDog/dd-sdk-swift-testing/releases/new](https://github.com/DataDog/dd-sdk-swift-testing/releases/new) and select `main` branch
6. Be sure to check box for **This is a pre-release**.
7. Validate that frameworks builds correctly, passes the tests, and generates `DatadogSDKTesting.zip` in the release assets.
8. Validate Performance:
1. Go to release Github Action and run it on the `main` branch with the version number you want to release [Release Action](https://github.com/DataDog/dd-sdk-swift-testing/actions/workflows/createRelease.yml)
2. Wait till action will do a build and a new **draft** release.
3. Validate Performance:
1. Go to https://github.com/DataDog/test-environment/actions/workflows/dd-sdk-swift-testing-tests.yml and manually trigger the GitHub Action.
2. Wait for the workflow to finish and make sure it passes.
3. Go to this [dashboard](https://app.datadoghq.com/dashboard/dyh-bqt-twa/tracers-performance-overhead-and-correctness-on-oss-projects?tpl_var_tracer_repository=dd-sdk-swift-testing) and check the `Max performance overhead (%)` graph. Max performance overhead shouldn’t have increased *significantly* on the latest data point. Keep in mind that values are noisy, so use your own judgement to decide whether an increase is something to worry about.
9. Go to the release page, and un-check **This is a pre-release**.
10. Upload Cocoapods version: `pod trunk push DatadogSDKTesting.podspec`
4. Go to the release page, and un-check **This is a pre-release**.