Skip to content

Commit 29b2282

Browse files
committed
Publish binary from main
1 parent f824880 commit 29b2282

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,15 @@ jobs:
5757
- run: cargo clippy -- -D warnings
5858

5959
gnu-testsuite:
60+
permissions:
61+
contents: write # Publish diffutils instead of discarding
6062
name: GNU test suite
6163
runs-on: ubuntu-latest
6264
steps:
6365
- uses: actions/checkout@v4
64-
- run: cargo build --release
66+
- run: |
67+
cargo build --config=profile.release.strip=true --profile=release #-fast
68+
zstd -19 target/release/diffutils -o diffutils-x86_64-unknown-linux-gnu.zst
6569
# do not fail, the report is merely informative (at least until all tests pass reliably)
6670
- run: ./tests/run-upstream-testsuite.sh release || true
6771
env:
@@ -71,6 +75,17 @@ jobs:
7175
name: test-results.json
7276
path: tests/test-results.json
7377
- run: ./tests/print-test-results.sh tests/test-results.json
78+
- name: Publish latest commit
79+
uses: softprops/action-gh-release@v2
80+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
81+
with:
82+
tag_name: latest-commit
83+
draft: false
84+
prerelease: true
85+
files: |
86+
diffutils-x86_64-unknown-linux-gnu.zst
87+
env:
88+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7489

7590
coverage:
7691
name: Code Coverage

0 commit comments

Comments
 (0)