Skip to content
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
1 change: 1 addition & 0 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Build Linux binaries
on:
- push
- pull_request
- workflow_call

jobs:
linux:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Build OSX binaries
on:
- push
- pull_request
- workflow_call

jobs:
osx:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Build Windows binaries
on:
- push
- pull_request
- workflow_call

jobs:
win64:
Expand Down Expand Up @@ -50,6 +51,15 @@ jobs:
- run: meson install -C ./build --destdir ./install --strip
working-directory: ./orbuculum
- run: cp ./libusb/install/bin/libusb-1.0.dll ./orbuculum/build/install/bin
- name: Bundle MinGW runtime DLLs
working-directory: ./orbuculum/build/install/bin
run: |
# Copy every DLL the binaries pull from the MSYS2 MinGW tree so they run standalone
for f in *.exe *.dll; do
ldd "$f" | awk '{print $3}' | grep -i '^/mingw64/' || true
done | sort -u | while read -r dll; do
cp -v "$dll" .
done
- uses: actions/upload-artifact@v4
with:
name: orbuculum-win64
Expand Down
94 changes: 94 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Release binaries

# Builds Linux, OSX and Windows binaries and publishes them to a rolling
# 'latest' release on every push to main. Pushing a v* tag additionally
# creates a versioned release.
#
# Download links:
# https://github.com/orbcode/orbuculum/releases/download/latest/orbuculum-linux.tar.gz
# https://github.com/orbcode/orbuculum/releases/download/latest/orbuculum-osx.tar.gz
# https://github.com/orbcode/orbuculum/releases/download/latest/orbuculum-win64.zip

on:
push:
branches:
- main
tags:
- 'v*'
workflow_dispatch:

permissions:
contents: write

concurrency:
group: release-${{ github.ref }}
cancel-in-progress: true

jobs:
linux:
uses: ./.github/workflows/build-linux.yml
osx:
uses: ./.github/workflows/build-osx.yml
windows:
uses: ./.github/workflows/build-windows.yml

release:
needs: [linux, osx, windows]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: dist

- name: Package
working-directory: dist
run: |
# Artifacts lose the executable bit; restore it on binaries
for p in orbuculum-linux orbuculum-osx; do
find "$p" -path '*/bin/*' -type f -exec chmod +x {} +
tar -czf "$p.tar.gz" -C "$p" .
done
(cd orbuculum-win64 && zip -r ../orbuculum-win64.zip .)
ls -l *.tar.gz *.zip

- name: Write release notes
run: |
cat > notes.md <<'NOTES'
## Runtime dependencies

**Windows (`orbuculum-win64.zip`)** - self-contained; all required DLLs are in `bin/`.

**Linux (`orbuculum-linux.tar.gz`)** - built on Ubuntu (latest LTS). Install:
```
sudo apt install libusb-1.0-0 libzmq5 libsdl2-2.0-0 libdw1 libelf1 libcapstone5
```

**macOS (`orbuculum-osx.tar.gz`)** - built on macOS 15 (Apple Silicon). Install:
```
brew install libusb zmq sdl2 libelf
```
NOTES
sed -i 's/^ //' notes.md

- name: Update 'latest' release
if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch'
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: |
git_sha=${{ github.sha }}
gh release delete latest --yes --cleanup-tag || true
gh release create latest dist/*.tar.gz dist/*.zip \
--target "$git_sha" \
--prerelease \
--title "Latest build (${git_sha:0:7})" \
--notes "$(printf 'Automated build of %s from %s.\n\n' "$git_sha" "$GITHUB_REF_NAME"; cat notes.md)"

- name: Create versioned release
if: startsWith(github.ref, 'refs/tags/v')
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: |
gh release create "$GITHUB_REF_NAME" dist/*.tar.gz dist/*.zip \
--title "$GITHUB_REF_NAME" --notes-file notes.md --generate-notes
Loading