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
55 changes: 55 additions & 0 deletions .github/workflows/release-linux-aarch64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Release Linux aarch64

on:
push:
tags: ["v*"]

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: jdx/mise-action@v2

- name: Add target
run: rustup target add aarch64-unknown-linux-gnu

- name: Install cross
run: cargo install cross --git https://github.com/cross-rs/cross

- name: Build
run: cross build --release --target aarch64-unknown-linux-gnu

- name: Strip binary
run: |
sudo apt-get install -y gcc-aarch64-linux-gnu
aarch64-linux-gnu-strip target/aarch64-unknown-linux-gnu/release/data-breaker

- name: Package artifact
run: cp target/aarch64-unknown-linux-gnu/release/data-breaker data-breaker-aarch64-unknown-linux-gnu

- name: Generate changelog
id: changelog
run: |
prev_tag=$(git tag --sort=-v:refname | sed -n '2p')
if [ -n "$prev_tag" ]; then
log=$(git log "${prev_tag}..HEAD" --pretty=format:"- %s (%h)" --no-merges)
else
log=$(git log --pretty=format:"- %s (%h)" --no-merges)
fi
{
echo "body<<EOF"
echo "$log"
echo "EOF"
} >> "$GITHUB_OUTPUT"

- uses: softprops/action-gh-release@v2
with:
body: ${{ steps.changelog.outputs.body }}
files: data-breaker-aarch64-unknown-linux-gnu
50 changes: 50 additions & 0 deletions .github/workflows/release-linux-x86_64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Release Linux x86_64

on:
push:
tags: ["v*"]

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: jdx/mise-action@v2

- name: Add target
run: rustup target add x86_64-unknown-linux-gnu

- name: Build
run: cargo build --release --target x86_64-unknown-linux-gnu

- name: Strip binary
run: strip target/x86_64-unknown-linux-gnu/release/data-breaker

- name: Package artifact
run: cp target/x86_64-unknown-linux-gnu/release/data-breaker data-breaker-x86_64-unknown-linux-gnu

- name: Generate changelog
id: changelog
run: |
prev_tag=$(git tag --sort=-v:refname | sed -n '2p')
if [ -n "$prev_tag" ]; then
log=$(git log "${prev_tag}..HEAD" --pretty=format:"- %s (%h)" --no-merges)
else
log=$(git log --pretty=format:"- %s (%h)" --no-merges)
fi
{
echo "body<<EOF"
echo "$log"
echo "EOF"
} >> "$GITHUB_OUTPUT"

- uses: softprops/action-gh-release@v2
with:
body: ${{ steps.changelog.outputs.body }}
files: data-breaker-x86_64-unknown-linux-gnu
50 changes: 50 additions & 0 deletions .github/workflows/release-macos-aarch64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Release macOS aarch64

on:
push:
tags: ["v*"]

permissions:
contents: write

jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: jdx/mise-action@v2

- name: Add target
run: rustup target add aarch64-apple-darwin

- name: Build
run: cargo build --release --target aarch64-apple-darwin

- name: Strip binary
run: strip target/aarch64-apple-darwin/release/data-breaker

- name: Package artifact
run: cp target/aarch64-apple-darwin/release/data-breaker data-breaker-aarch64-apple-darwin

- name: Generate changelog
id: changelog
run: |
prev_tag=$(git tag --sort=-v:refname | sed -n '2p')
if [ -n "$prev_tag" ]; then
log=$(git log "${prev_tag}..HEAD" --pretty=format:"- %s (%h)" --no-merges)
else
log=$(git log --pretty=format:"- %s (%h)" --no-merges)
fi
{
echo "body<<EOF"
echo "$log"
echo "EOF"
} >> "$GITHUB_OUTPUT"

- uses: softprops/action-gh-release@v2
with:
body: ${{ steps.changelog.outputs.body }}
files: data-breaker-aarch64-apple-darwin
50 changes: 50 additions & 0 deletions .github/workflows/release-macos-x86_64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Release macOS x86_64

on:
push:
tags: ["v*"]

permissions:
contents: write

jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: jdx/mise-action@v2

- name: Add target
run: rustup target add x86_64-apple-darwin

- name: Build
run: cargo build --release --target x86_64-apple-darwin

- name: Strip binary
run: strip target/x86_64-apple-darwin/release/data-breaker

- name: Package artifact
run: cp target/x86_64-apple-darwin/release/data-breaker data-breaker-x86_64-apple-darwin

- name: Generate changelog
id: changelog
run: |
prev_tag=$(git tag --sort=-v:refname | sed -n '2p')
if [ -n "$prev_tag" ]; then
log=$(git log "${prev_tag}..HEAD" --pretty=format:"- %s (%h)" --no-merges)
else
log=$(git log --pretty=format:"- %s (%h)" --no-merges)
fi
{
echo "body<<EOF"
echo "$log"
echo "EOF"
} >> "$GITHUB_OUTPUT"

- uses: softprops/action-gh-release@v2
with:
body: ${{ steps.changelog.outputs.body }}
files: data-breaker-x86_64-apple-darwin
45 changes: 45 additions & 0 deletions .github/workflows/release-windows-x86_64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Release Windows x86_64

on:
push:
tags: ["v*"]

permissions:
contents: write

jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: jdx/mise-action@v2

- name: Build
run: cargo build --release --target x86_64-pc-windows-msvc

- name: Package artifact
run: cp target/x86_64-pc-windows-msvc/release/data-breaker.exe data-breaker-x86_64-pc-windows-msvc.exe

- name: Generate changelog
id: changelog
shell: bash
run: |
prev_tag=$(git tag --sort=-v:refname | sed -n '2p')
if [ -n "$prev_tag" ]; then
log=$(git log "${prev_tag}..HEAD" --pretty=format:"- %s (%h)" --no-merges)
else
log=$(git log --pretty=format:"- %s (%h)" --no-merges)
fi
{
echo "body<<EOF"
echo "$log"
echo "EOF"
} >> "$GITHUB_OUTPUT"

- uses: softprops/action-gh-release@v2
with:
body: ${{ steps.changelog.outputs.body }}
files: data-breaker-x86_64-pc-windows-msvc.exe
137 changes: 0 additions & 137 deletions .github/workflows/release.yml

This file was deleted.

Loading