Commit 5326579227
5326579227a3ca41f7ddb3a1815a3edb3a750c78
parent: 9c67bdca08
Unsigned
Vitaly Zdanevich <zdanevich.vitaly@ya.ru> · 2026-05-28 11:15 UTC
ci: add GitHub Action to upload vendor tarball on release
This adds a simple GitHub Action that automatically vendors Rust crates and uploads a `youtube-tui-<tag>-crates.tar.xz` tarball to GitHub Releases whenever a new tag (`v*`) is pushed.
Why is this needed?
When packaging Rust applications for Linux distributions (e.g. Gentoo, Alpine, Void, NixOS), the package build environment is typically sandboxed and lacks internet access to enforce reproducibility. Because of this, package maintainers must either list every single dependency as an individual download source, or rely on a single vendored tarball.
By attaching a vendored tarball to the official releases, upstream directly enables offline, reproducible builds for distributions, significantly easing the packaging process.
Layout: unified · split
.github/workflows/release-crates-tarball.yml
added
+29
| @@ -0,0 +1,29 @@ |
| |
1 | name: "Release Crates Tarball" |
| |
2 | on: |
| |
3 | push: |
| |
4 | tags: |
| |
5 | - 'v*' |
| |
6 | |
| |
7 | jobs: |
| |
8 | release-tarball: |
| |
9 | name: Generate and Upload Vendor Tarball |
| |
10 | runs-on: ubuntu-latest |
| |
11 | permissions: |
| |
12 | contents: write |
| |
13 | steps: |
| |
14 | - uses: actions/checkout@v4 |
| |
15 | |
| |
16 | - name: Install Rust |
| |
17 | uses: dtolnay/rust-toolchain@stable |
| |
18 | |
| |
19 | - name: Vendor Dependencies |
| |
20 | run: | |
| |
21 | # Generate the vendor directory |
| |
22 | cargo vendor |
| |
23 | # Archive it into a tarball |
| |
24 | tar -cJf youtube-tui-${{ github.ref_name }}-crates.tar.xz vendor/ |
| |
25 | |
| |
26 | - name: Upload Release Asset |
| |
27 | uses: softprops/action-gh-release@v2 |
| |
28 | with: |
| |
29 | files: youtube-tui-${{ github.ref_name }}-crates.tar.xz |