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

for mac, upload plain binary instead of installer #232

Merged
merged 6 commits into from
Mar 2, 2025
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
21 changes: 4 additions & 17 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

name: build-release
name: Release
on:
push:
branches: [ "main" ]
Expand All @@ -13,6 +12,7 @@ on:
options:
- latest
- stable
- none

env:
CARGO_TERM_COLOR: always
Expand All @@ -25,6 +25,7 @@ permissions:

jobs:
docker:
if: ${{ inputs.docker-tag-type != 'none' }}
environment: Docker Hub
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -92,21 +93,7 @@ jobs:
uses: actions/attest-build-provenance@v1
with:
subject-path: "target/release/${{ env.BUILD_FILE_NAME }}"
- name: mac installer
if: ${{ runner.os == 'macOS' }}
run: |
tmp_file="$(mktemp)"
cp scripts/installer.sh "$tmp_file"
base64 -b 72 -i target/release/mdq | sed 's/^/# /' >> "$tmp_file"
mv "$tmp_file" target/release/mdq-installer.sh
export BUILD_FILE_NAME=mdq-installer.sh
echo BUILD_FILE_NAME=mdq-installer.sh >> "$GITHUB_ENV"
- name: Attest Build Provenance (mac installer)
if: ${{ runner.os == 'macOS' }}
uses: actions/attest-build-provenance@v1
with:
subject-path: "target/release/${{ env.BUILD_FILE_NAME }}"
- name: upload
- name: upload binary
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,12 @@ Any of these will work:
```
4. Download binaries from [the latest release] (or any other release, of course).

You can also grab the binaries from the latest [build-release] workflow run. You must be logged into GitHub to do
that (this is GitHub's limitation, not mine). You'll have to `chmod +x` them before you can run them.
- Macs quarantine downloads from the internet by default. If you get an error saying that Apple cannot check the the binary for malicious software, you can remove this flag by running the following on the binary after extracting it from the artifact zip:
```bash
xattr -d com.apple.quarantine mdq
```
- You can also grab the binaries from the latest [build-release] workflow run. You must be logged into GitHub to do
that (this is GitHub's limitation, not mine). You'll have to `chmod +x` them before you can run them.

<details>
<summary>Security concerns</summary>
Expand Down
13 changes: 0 additions & 13 deletions scripts/installer.sh

This file was deleted.

Loading