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

Fix some bugs with the new release pipeline #8488

Merged
merged 6 commits into from
Feb 14, 2024
Merged

Conversation

tgoyne
Copy link
Member

@tgoyne tgoyne commented Feb 13, 2024

actions/upload-artifact follows symlinks when asked to archive a directory, which results in the release package having three copies of each macos/catalyst library. To fix this, skip extracting the zip before archiving even though it results in an awkward nested zip.

Building RealmSwift also builds Realm, so we don't need the obj-c specific build jobs.

Docs and update checker publishing were failing due to s3cmd not being installed. Docs publishing still doesn't work because the s3 account we're using doesn't have access to the bucket. Passing the token as a CLI argument hits a bug in s3cmd where access denied errors are reported as the config file being malformed, while passing them as env variables gives more accurate errors.

Using setup-ruby plus bundler to install ruby and gems makes it only take 5-10 seconds and lets us pin specific versions of the gems.

actions/upload-artifact follows symlinks when asked to archive a directory,
which results in the release package having three copies of each macos/catalyst
library. To fix this, skip extracting the zip before archiving even though it
results in an awkward nested zip.
Copy link
Contributor

@dianaafanador3 dianaafanador3 left a comment

Choose a reason for hiding this comment

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

LGTM!, Thanks for fixing the issues on this, just some minor comments.
Probably wait for Chris to provide docs credentials before merging this.

test-installation:
runs-on: macos-13
name: Run installation test for ${{ matrix.platform }}, ${{ matrix.installation }} and ${{ matrix.linkage }}
needs: [create-release, prepare]
needs: [create-release, prepare, publish-cocoapods]
Copy link
Contributor

Choose a reason for hiding this comment

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

my mistake not having in mind that we need CocoaPods published for the installation tests

build.sh Outdated Show resolved Hide resolved
build.sh Outdated Show resolved Hide resolved
VERSION="$(sed -n 's/^VERSION=\(.*\)$/\1/p' "${source_root}/dependencies.list")"
PRERELEASE_REGEX='alpha|beta|rc|preview'
if [[ $VERSION =~ $PRERELEASE_REGEX ]]; then
echo "Pre-release version"
exit 0
fi

s3cmd put --recursive --acl-public --access_key=${AWS_ACCESS_KEY_ID} --secret_key=${AWS_SECRET_ACCESS_KEY} docs/swift_output/ s3://realm-sdks/docs/realm-sdks/swift/${VERSION}/
s3cmd put --recursive --acl-public --access_key=${AWS_ACCESS_KEY_ID} --secret_key=${AWS_SECRET_ACCESS_KEY} docs/swift_output/ s3://realm-sdks/docs/realm-sdks/swift/latest/
s3cmd put --no-mime-magic --guess-mime-type --recursive --acl-public docs/swift_output/ s3://realm-sdks/docs/realm-sdks/swift/${VERSION}/
Copy link
Contributor

Choose a reason for hiding this comment

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

are we getting the credentials from the environment values here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, s3cmd reads the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables if they exist.

.github/workflows/master-push.yml Outdated Show resolved Hide resolved
@tgoyne
Copy link
Member Author

tgoyne commented Feb 14, 2024

Successful run with the new tokens: https://github.com/realm/realm-swift/actions/runs/7904978638/job/21576536648

@tgoyne tgoyne merged commit aa5a449 into master Feb 14, 2024
118 checks passed
@tgoyne tgoyne deleted the tg/release-symlink branch February 14, 2024 18:38
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants