-
Notifications
You must be signed in to change notification settings - Fork 19
release: add cli for aarch64-darwin #2278
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
ee8df43
release: extract CLI build into shared build_cli action
sespiros 7477d11
release: make S3 pre-release paths deterministic per workflow attempt
sespiros 1e38d67
release: extract S3 upload into shared s3_upload action
sespiros 58c4892
release: add aarch64-darwin CLI to release pipeline
sespiros 3667d48
docs: add macOS install instructions for CLI
sespiros dd23609
ci: add darwin CLI to pr release artifacts workflow
sespiros cdef68b
ci: fix s3_upload action on macOS
sespiros File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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,20 @@ | ||
| name: build CLI | ||
| description: Build the Contrast CLI release binary for a given system | ||
|
|
||
| inputs: | ||
| system: | ||
| description: Nix system (e.g. x86_64-linux, aarch64-darwin) | ||
| required: true | ||
|
|
||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - name: Build CLI | ||
| shell: bash | ||
| env: | ||
| SET: base | ||
| SYSTEM: ${{ inputs.system }} | ||
| run: | | ||
| mkdir -p workspace | ||
| nix build -L ".#${SET}.contrast.cli-release" | ||
| cp result/bin/contrast "workspace/contrast-${SYSTEM}" |
This file contains hidden or 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 hidden or 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,40 @@ | ||
| name: upload to S3 | ||
| description: Upload files to the contrast-public S3 bucket (assumes role via OIDC) | ||
|
|
||
| inputs: | ||
| files: | ||
| description: Newline-separated list of files or glob patterns to upload | ||
| required: true | ||
| s3-bucket-path: | ||
| description: S3 key prefix (under the contrast-public bucket) | ||
| required: true | ||
|
|
||
| outputs: | ||
| url: | ||
| description: Public URL of the uploaded artifacts | ||
| value: ${{ steps.upload-artifacts.outputs.url }} | ||
|
|
||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - name: AWS login (IAM role) | ||
| uses: aws-actions/configure-aws-credentials@ec61189d14ec14c8efccab744f656cffd0e33f37 # v6.1.0 | ||
| with: | ||
| role-to-assume: arn:aws:iam::795746500882:role/ContrastPublicBucketRW | ||
| aws-region: eu-central-1 | ||
| - name: Upload pre-release artifacts to S3 bucket contrast-public | ||
| id: upload-artifacts | ||
| shell: bash | ||
| env: | ||
| S3_BUCKET_PATH: ${{ inputs.s3-bucket-path }} | ||
| FILES: ${{ inputs.files }} | ||
| run: | | ||
| shopt -s nullglob | ||
| while IFS= read -r pattern; do | ||
| for file in $pattern; do | ||
| aws s3 cp "$file" "s3://contrast-public/${S3_BUCKET_PATH}/" | ||
| done | ||
| done <<< "$FILES" | ||
| url="https://contrast-public.s3.eu-central-1.amazonaws.com/${S3_BUCKET_PATH}/" | ||
| echo "Artifacts available at $url" | tee -a "$GITHUB_STEP_SUMMARY" | ||
| echo "url=$url" | tee -a "$GITHUB_OUTPUT" |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.