Skip to content

Commit e98b4d8

Browse files
committed
feat: dockerhub release
1 parent de393b5 commit e98b4d8

4 files changed

Lines changed: 26 additions & 23 deletions

File tree

.github/workflows/release.yml

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -26,26 +26,35 @@ jobs:
2626
## macOS: aarch64, x86_64
2727
- target: aarch64-apple-darwin
2828
os: macos-latest
29+
bin_ext: ""
2930
- target: x86_64-apple-darwin
3031
os: macos-latest
32+
bin_ext: ""
3133
## Linux:
3234
## Linux: aarch64, x86_64
3335
- target: aarch64-unknown-linux-gnu
3436
os: ubuntu-latest
37+
bin_ext: ""
3538
- target: aarch64-unknown-linux-musl
3639
os: ubuntu-latest
40+
bin_ext: ""
3741
- target: x86_64-unknown-linux-gnu
3842
os: ubuntu-latest
43+
bin_ext: ""
3944
- target: x86_64-unknown-linux-musl
4045
os: ubuntu-latest
46+
bin_ext: ""
4147
## Windows: x86_64
4248
- target: x86_64-pc-windows-msvc
4349
os: windows-latest
50+
bin_ext: ".exe"
4451
- target: x86_64-pc-windows-gnu
4552
os: windows-latest
53+
bin_ext: ".exe"
4654
# FreeBSD: x86_64
4755
- target: x86_64-unknown-freebsd
4856
os: ubuntu-latest
57+
bin_ext: ""
4958
runs-on: ${{ matrix.os }}
5059
steps:
5160
- uses: actions/checkout@v4
@@ -65,34 +74,20 @@ jobs:
6574
if: "!startsWith(matrix.os, 'ubuntu')"
6675
run: cargo build --release --locked --target ${{ matrix.target }}
6776

68-
- name: Prepare dist
77+
- name: Prepare release binary
78+
id: prepare
6979
shell: bash
7080
run: |
7181
mkdir -p dist
72-
cp "target/${{ matrix.target }}/release/diff-coverage" dist/
73-
cp README.md dist/
74-
75-
- name: Package (tar.gz)
76-
if: runner.os != 'Windows'
77-
shell: bash
78-
run: |
79-
archive="diff-coverage-${{ github.ref_name }}-${{ matrix.target }}.tar.gz"
80-
tar -czf "$archive" -C dist .
81-
echo "archive=$archive" >> "$GITHUB_OUTPUT"
82-
83-
- name: Package (zip)
84-
if: runner.os == 'Windows'
85-
shell: pwsh
86-
run: |
87-
$archive = "diff-coverage-${{ github.ref_name }}-${{ matrix.target }}.zip"
88-
Compress-Archive -Path dist\* -DestinationPath $archive
89-
"archive=$archive" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
82+
asset="diff-coverage-${{ github.ref_name }}-${{ matrix.target }}${{ matrix.bin_ext }}"
83+
cp "target/${{ matrix.target }}/release/diff-coverage${{ matrix.bin_ext }}" "dist/$asset"
84+
echo "asset=dist/$asset" >> "$GITHUB_OUTPUT"
9085
9186
- name: Upload release assets
9287
uses: softprops/action-gh-release@v2
9388
with:
9489
files: |
95-
diff-coverage-${{ github.ref_name }}-${{ matrix.target }}.*
90+
${{ steps.prepare.outputs.asset }}
9691
9792
publish:
9893
runs-on: ubuntu-latest
@@ -107,4 +102,4 @@ jobs:
107102
id: auth
108103
- run: cargo publish
109104
env:
110-
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
105+
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# 0.2.0 - 2027-02-10
2+
3+
Added
4+
- Dockerhub release
5+
6+
Changed
7+
- Output binaries in releases instead of archives with README
8+
19
# 0.1.6 - 2026-01-30
210

311
Fixed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "diff-coverage"
3-
version = "0.1.6"
3+
version = "0.2.0"
44
edition = "2021"
55
description = "Diff-coverage, supercharged in Rust. Fast, memory-efficient coverage on changed lines for CI."
66
license = "MIT"

0 commit comments

Comments
 (0)